mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 23:57:03 +08:00
Fix check for buffer overflow when processing version information.
PR binutils/21148 * readelf.c (process_version_sections): Include size of auxillary version information when checking for buffer overflow.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2017-02-13 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR binutils/21148
|
||||||
|
* readelf.c (process_version_sections): Include size of auxillary
|
||||||
|
version information when checking for buffer overflow.
|
||||||
|
|
||||||
2017-02-13 Nick Clifton <nickc@redhat.com>
|
2017-02-13 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR binutils/21147
|
PR binutils/21147
|
||||||
|
@ -10019,7 +10019,7 @@ process_version_sections (FILE * file)
|
|||||||
ent.vd_ndx, ent.vd_cnt);
|
ent.vd_ndx, ent.vd_cnt);
|
||||||
|
|
||||||
/* Check for overflow. */
|
/* Check for overflow. */
|
||||||
if (ent.vd_aux > (size_t) (endbuf - vstart))
|
if (ent.vd_aux + sizeof (* eaux) > (size_t) (endbuf - vstart))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
vstart += ent.vd_aux;
|
vstart += ent.vd_aux;
|
||||||
|
Reference in New Issue
Block a user