From: Pedro Franco de Carvalho Date: Fri, 9 Aug 2019 19:49:46 +0000 (-0300) Subject: Fix access to uninitialized variable in fill_in_stop_func X-Git-Tag: binutils-2_33~281 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dac36daf78653a8e4688b825cdb15461a88470d2;p=external%2Fbinutils.git Fix access to uninitialized variable in fill_in_stop_func This patch changes find_pc_partial_function so that *block is set to nullptr when it fails, so that fill_in_stop_func won't access an uninitialized variable. gdb/ChangeLog: 2019-08-09 Pedro Franco de Carvalho * blockframe.c (find_pc_partial_function): Set *block to nullptr when the function fails. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 00e4bac..4008783 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-08-09 Pedro Franco de Carvalho + + * blockframe.c (find_pc_partial_function): Set *block to nullptr + when the function fails. + 2019-08-09 Andreas Arnez * s390-tdep.c (s390_type_align): New function. diff --git a/gdb/blockframe.c b/gdb/blockframe.c index fe7807b..4462274 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -331,6 +331,8 @@ find_pc_partial_function (CORE_ADDR pc, const char **name, CORE_ADDR *address, *address = 0; if (endaddr != NULL) *endaddr = 0; + if (block != nullptr) + *block = nullptr; return 0; }