This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
+ string = (char *) xmalloc (strlen (search->name) + + strlen (entry->filename) + + sizeof "/.exe"); + + sprintf (string, "%s/%s.exe", search->name, entry->filename);
What about the zero-terminator for the string ? Ie this looks like a possible memory corruption bug to me.
Isn't sizeof ("./exe") == 6 (ie, strlen + 1) ?
Cheers Nick
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |