Closed GoogleCodeExporter closed 8 years ago
Thanks. I've made the changes to utils.c, and tested it.
The file is attached.
Original comment by dan.bloo...@gmail.com
on 5 Dec 2009 at 5:59
Attachments:
This fix will be in 1.64.
Original comment by dan.bloo...@gmail.com
on 5 Dec 2009 at 6:00
Just took a look at your change to genPathname() in utils.c
You do:
dirlen = strlen(charbuf);
if (charbuf[dirlen - 1] != sepchar) /* append sepchar */
charbuf[dirlen] = sepchar;
strncat(charbuf, fname, namelen);
return charbuf;
Offhand, that looks to me like you clobber charbuf's trailing null with
sepchar? In
which case, strncat is going to be very confused. I think you still need my:
charbuf[dirlen+1] = '\0';
Original comment by tomp2...@gmail.com
on 8 Dec 2009 at 8:47
I don't think so. The calloc initialized charbuf to 0.
After copying the (possibly munged) directory name, and appending
the sepchar, all the remaining chars in charbuf are still 0.
That's why I left it off.
Original comment by dan.bloo...@gmail.com
on 8 Dec 2009 at 10:19
Fixed in 1.64
Original comment by dan.bloo...@gmail.com
on 3 Jan 2010 at 11:31
Original issue reported on code.google.com by
tomp2...@gmail.com
on 1 Dec 2009 at 8:13