mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
Fix NULL pointer dereference
This commit fixes a segmentation fault on tab completion when certain debuginfo is installed: https://bugzilla.redhat.com/show_bug.cgi?id=1398387 gdb/ChangeLog: * symtab.c (add_symtab_completions): Prevent NULL pointer dereference.
This commit is contained in:
parent
9d5c5dd77b
commit
ff6fa24786
@ -1,3 +1,8 @@
|
|||||||
|
2017-02-09 Gary Benson <gbenson@redhat.com>
|
||||||
|
|
||||||
|
* symtab.c (add_symtab_completions): Prevent NULL pointer
|
||||||
|
dereference.
|
||||||
|
|
||||||
2017-02-08 Pedro Alves <palves@redhat.com>
|
2017-02-08 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
* interps.c (interp::interp): Remove reference to quiet_p.
|
* interps.c (interp::interp): Remove reference to quiet_p.
|
||||||
|
@ -5163,6 +5163,9 @@ add_symtab_completions (struct compunit_symtab *cust,
|
|||||||
struct block_iterator iter;
|
struct block_iterator iter;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (cust == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++)
|
for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++)
|
||||||
{
|
{
|
||||||
QUIT;
|
QUIT;
|
||||||
|
Loading…
Reference in New Issue
Block a user