Fix <tab>-completion crash (Gary Benson, RH BZ 1398387).
This commit is contained in:
parent
04e185f768
commit
8d40388f0a
@ -720,3 +720,40 @@ Date: Fri Sep 23 17:27:26 2016 +0100
|
||||
if (stat (procentry, &statbuf) == 0
|
||||
&& S_ISDIR (statbuf.st_mode))
|
||||
{
|
||||
|
||||
|
||||
|
||||
http://sourceware.org/ml/gdb-patches/2017-02/msg00226.html
|
||||
Subject: [OB PATCH] 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.
|
||||
---
|
||||
gdb/ChangeLog | 5 +++++
|
||||
gdb/symtab.c | 3 +++
|
||||
2 files changed, 8 insertions(+)
|
||||
|
||||
diff --git a/gdb/symtab.c b/gdb/symtab.c
|
||||
index 356f480..2c141e5 100644
|
||||
--- a/gdb/symtab.c
|
||||
+++ b/gdb/symtab.c
|
||||
@@ -5163,6 +5163,9 @@ add_symtab_completions (struct compunit_symtab *cust,
|
||||
struct block_iterator iter;
|
||||
int i;
|
||||
|
||||
+ if (cust == NULL)
|
||||
+ return;
|
||||
+
|
||||
for (i = GLOBAL_BLOCK; i <= STATIC_BLOCK; i++)
|
||||
{
|
||||
QUIT;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
|
5
gdb.spec
5
gdb.spec
@ -26,7 +26,7 @@ Version: 7.12.1
|
||||
|
||||
# The release always contains a leading reserved number, start it at 1.
|
||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||
Release: 45%{?dist}
|
||||
Release: 46%{?dist}
|
||||
|
||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
|
||||
Group: Development/Debuggers
|
||||
@ -1590,6 +1590,9 @@ then
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Wed Feb 15 2017 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12.1-46.fc26
|
||||
- Fix <tab>-completion crash (Gary Benson, RH BZ 1398387).
|
||||
|
||||
* Tue Feb 14 2017 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.12.1-45.fc26
|
||||
- Release bump.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user