Module: wine Branch: master Commit: a2d04673e6522036fe7f3d9ee3b7a10b6ae41435 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a2d04673e6522036fe7f3d9ee3...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Sep 25 11:19:23 2008 +0200
gdiplus: Fix a string buffer overflow.
---
dlls/gdiplus/graphics.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
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 @@ GpStatus WINGDIPAPI GdipMeasureString(GpGraphics *graphics,
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));