From bd4408eccc01418077727b75f8383fb4d03d2b90 Mon Sep 17 00:00:00 2001 From: Austin English Date: Mon, 20 Oct 2008 16:43:27 -0500 Subject: [PATCH] gdi32: fix a potential NULL point dereference --- dlls/gdi32/driver.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 21342bb..253ffdc 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -608,18 +608,24 @@ INT WINAPI Escape( HDC hdc, INT escape, INT in_count, LPCSTR in_data, LPVOID out return EndDoc( hdc ); case GETPHYSPAGESIZE: + if(!out_data) + return 0; pt = out_data; pt->x = GetDeviceCaps( hdc, PHYSICALWIDTH ); pt->y = GetDeviceCaps( hdc, PHYSICALHEIGHT ); return 1; case GETPRINTINGOFFSET: + if(!out_data) + return 0; pt = out_data; pt->x = GetDeviceCaps( hdc, PHYSICALOFFSETX ); pt->y = GetDeviceCaps( hdc, PHYSICALOFFSETY ); return 1; case GETSCALINGFACTOR: + if(!out_data) + return 0; pt = out_data; pt->x = GetDeviceCaps( hdc, SCALINGFACTORX ); pt->y = GetDeviceCaps( hdc, SCALINGFACTORY ); -- 1.5.3.6