[PATCH] gdiplus: fix segfault in gdip_format_string

hellas at burntcomma.com hellas at burntcomma.com
Thu Apr 10 15:27:46 CDT 2014


gdip_format_string can segfault if the format param is NULL. Fixes bug 
35964

---
  dlls/gdiplus/graphics.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c
index 56d785e..8c837eb 100644
--- a/dlls/gdiplus/graphics.c
+++ b/dlls/gdiplus/graphics.c
@@ -4499,7 +4499,7 @@ GpStatus gdip_format_string(HDC hdc,

          if(height + size.cy > nheight)
          {
-            if (format->attr & StringFormatFlagsLineLimit)
+            if (format && format->attr & StringFormatFlagsLineLimit)
                  break;
              bounds.Height = nheight - (height + size.cy);
          }
-- 
1.8.3.2





More information about the wine-patches mailing list