* [commit/obvious] guard against NULL in TUI code
@ 2007-11-13 17:07 Thiago Jung Bauermann
0 siblings, 0 replies; only message in thread
From: Thiago Jung Bauermann @ 2007-11-13 17:07 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 313 bytes --]
Hi,
I just committed this patch, which fixes a segfault that can be
triggered by:
$ gdb
(gdb) focus cmd
(gdb) focus prev
I just added a NULL check to tui_prev_win which was already present in
the corresponding tui_next_win function.
--
[]'s
Thiago Jung Bauermann
Software Engineer
IBM Linux Technology Center
[-- Attachment #2: tui-guard-null.diff --]
[-- Type: text/x-patch, Size: 693 bytes --]
2007-11-13 Thiago Jung Bauermann <bauerman@br.ibm.com>
* tui/tui-data.c (tui_prev_win): Guard against NULL.
Index: tui/tui-data.c
===================================================================
RCS file: /cvs/src/src/gdb/tui/tui-data.c,v
retrieving revision 1.22
diff -u -r1.22 tui-data.c
--- tui/tui-data.c 23 Aug 2007 18:08:50 -0000 1.22
+++ tui/tui-data.c 13 Nov 2007 16:56:31 -0000
@@ -370,7 +370,8 @@
type = cur_win->generic.type - 1;
while (type != cur_win->generic.type && (prev == NULL))
{
- if (tui_win_list[type]->generic.is_visible)
+ if (tui_win_list[type]
+ && tui_win_list[type]->generic.is_visible)
prev = tui_win_list[type];
else
{
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-13 17:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-13 17:07 [commit/obvious] guard against NULL in TUI code Thiago Jung Bauermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox