mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
2011-02-28 Michael Snyder <msnyder@vmware.com>
* coffread.c (coff_getfilename): Add check to avoid overflow.
This commit is contained in:
@ -1,5 +1,7 @@
|
|||||||
2011-02-28 Michael Snyder <msnyder@vmware.com>
|
2011-02-28 Michael Snyder <msnyder@vmware.com>
|
||||||
|
|
||||||
|
* coffread.c (coff_getfilename): Add check to avoid overflow.
|
||||||
|
|
||||||
* objc-lang.c (selectors_info): Add a small safety margin to
|
* objc-lang.c (selectors_info): Add a small safety margin to
|
||||||
avoid overflow.
|
avoid overflow.
|
||||||
(classes_info): Error out on too long REGEXP.
|
(classes_info): Error out on too long REGEXP.
|
||||||
|
@ -1316,7 +1316,11 @@ coff_getfilename (union internal_auxent *aux_entry)
|
|||||||
char *result;
|
char *result;
|
||||||
|
|
||||||
if (aux_entry->x_file.x_n.x_zeroes == 0)
|
if (aux_entry->x_file.x_n.x_zeroes == 0)
|
||||||
strcpy (buffer, stringtab + aux_entry->x_file.x_n.x_offset);
|
{
|
||||||
|
if (strlen (stringtab + aux_entry->x_file.x_n.x_offset) >= BUFSIZ)
|
||||||
|
internal_error (__FILE__, __LINE__, _("coff file name too long"));
|
||||||
|
strcpy (buffer, stringtab + aux_entry->x_file.x_n.x_offset);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strncpy (buffer, aux_entry->x_file.x_fname, FILNMLEN);
|
strncpy (buffer, aux_entry->x_file.x_fname, FILNMLEN);
|
||||||
|
Reference in New Issue
Block a user