gdiplus: Fix a string buffer overflow.

This commit is contained in:
Alexandre Julliard 2008-09-25 11:19:23 +02:00
parent b562a512eb
commit a2d04673e6
1 changed files with 1 additions and 1 deletions

View File

@ -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));