commit | a2d04673e6522036fe7f3d9ee3b7a10b6ae41435 | [log] [tgz] |
---|---|---|
author | Alexandre Julliard <julliard@winehq.org> | Thu Sep 25 11:19:23 2008 +0200 |
committer | Alexandre Julliard <julliard@winehq.org> | Thu Sep 25 11:19:23 2008 +0200 |
tree | 3bc6d88cdf5c981195534cb319cb031ac97f795a | |
parent | b562a512eb1bc8b8113268c92b7b9ae3db7c67a7 [diff] [blame] |
gdiplus: Fix a string buffer overflow.
diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index c1e63f6..3689fd3 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c
@@ -2625,7 +2625,7 @@ if(length == -1) length = lstrlenW(string); - stringdup = GdipAlloc(length * sizeof(WCHAR)); + stringdup = GdipAlloc((length + 1) * sizeof(WCHAR)); if(!stringdup) return OutOfMemory; oldfont = SelectObject(graphics->hdc, CreateFontIndirectW(&font->lfw));