diff --git a/gdb-upstream.patch b/gdb-upstream.patch index 3e40f1c..b32529c 100644 --- a/gdb-upstream.patch +++ b/gdb-upstream.patch @@ -457,3 +457,40 @@ index 378eea0..7d9b198 100644 verbose -log "get_compiler_info: $compiler_info" --IS0zKkzwUGydFO0o-- + + + +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 + diff --git a/gdb.spec b/gdb.spec index 6825c02..814aa54 100644 --- a/gdb.spec +++ b/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 @@ -1585,6 +1585,9 @@ then fi %changelog +* Wed Feb 15 2017 Jan Kratochvil - 7.12.1-46.fc25 +- Fix -completion crash (Gary Benson, RH BZ 1398387). + * Tue Feb 14 2017 Jan Kratochvil - 7.12.1-45.fc25 - Release bump.