From 709a2343a8c12ea7e158c63a9737b11744b50994 Mon Sep 17 00:00:00 2001 From: Alexander Gottwald Date: Sat, 8 Jan 2005 13:01:03 +0000 Subject: Fix a possible null-pointer dereference (Keishi Suenaga) --- hw/xwin/ChangeLog | 5 +++++ hw/xwin/winblock.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'hw/xwin') diff --git a/hw/xwin/ChangeLog b/hw/xwin/ChangeLog index 3d5bd1e83..e0970a7b0 100644 --- a/hw/xwin/ChangeLog +++ b/hw/xwin/ChangeLog @@ -1,3 +1,8 @@ +2005-01-08 Alexander Gottwald + + * winblock.c: + Fix a possible null-pointer dereference (Keishi Suenaga) + 2005-01-06 Alexander Gottwald * Imakefile diff --git a/hw/xwin/winblock.c b/hw/xwin/winblock.c index 37da595a7..1d21faf46 100644 --- a/hw/xwin/winblock.c +++ b/hw/xwin/winblock.c @@ -54,8 +54,11 @@ winBlockHandler (int nScreen, MSG msg; #ifndef HAS_DEVWINDOWS struct timeval **tvp = pTimeout; - (*tvp)->tv_sec = 0; - (*tvp)->tv_usec = 100; + if (*tvp != NULL) + { + (*tvp)->tv_sec = 0; + (*tvp)->tv_usec = 100; + } #endif #if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) -- cgit v1.2.3