Fix a buffer overrun when parsing a corrupt MIPS ELF binary.
PR 21995 * readelf.c (process_mips_specific): Add checks for a NULL data pointer.
This commit is contained in:
parent
22916b0786
commit
f17e9d8ab5
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2017-09-05 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
PR 21995
|
||||
* readelf.c (process_mips_specific): Add checks for a NULL data
|
||||
pointer.
|
||||
|
||||
2017-09-05 Alexander Fedotov <alexander.fedotov@nxp.com>
|
||||
Edmar Wienskoski <edmar.wienskoski@nxp.com
|
||||
|
||||
|
|
|
@ -15324,7 +15324,7 @@ process_mips_specific (FILE * file)
|
|||
printf ("\n");
|
||||
}
|
||||
|
||||
if (ent < end)
|
||||
if (data != NULL && ent < end)
|
||||
{
|
||||
printf (_(" Local entries:\n"));
|
||||
printf (" %*s %10s %*s\n",
|
||||
|
@ -15854,7 +15854,7 @@ process_mips_specific (FILE * file)
|
|||
}
|
||||
printf ("\n");
|
||||
|
||||
if (ent < local_end)
|
||||
if (data != NULL && ent < local_end)
|
||||
{
|
||||
printf (_(" Local entries:\n"));
|
||||
printf (" %*s %10s %*s\n",
|
||||
|
@ -15870,7 +15870,7 @@ process_mips_specific (FILE * file)
|
|||
printf ("\n");
|
||||
}
|
||||
|
||||
if (gotsym < symtabno)
|
||||
if (data != NULL && gotsym < symtabno)
|
||||
{
|
||||
int sym_width;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue