gnuastro-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnuastro-devel] [bug #48611] Buffer to copy non-directory part is too s


From: Vladimir Markelov
Subject: [gnuastro-devel] [bug #48611] Buffer to copy non-directory part is too small
Date: Sun, 24 Jul 2016 02:24:35 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0

URL:
  <http://savannah.gnu.org/bugs/?48611>

                 Summary: Buffer to copy non-directory part is too small
                 Project: GNU Astronomy Utilities
            Submitted by: vvm
            Submitted on: Sat 23 Jul 2016 07:24:33 PM PDT
                Category: Libraries
                Severity: 2 - Minor
              Item Group: Source code
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Off-by-one error. No space for ending '\0':

l=strlen(tmp);
  errno=0;
  out=malloc(l*sizeof *out);
  if(out==NULL)
    error(EXIT_FAILURE, errno, "%lu bytes for notdir", l*sizeof *out);
strcpy(out, tmp);




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48611>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]