Esme Povirk : gdiplus: Fix use after free in GdipAddPathString.
Module: wine Branch: master Commit: 3ca8204837ffa56064c61981fcb5128981f17196 URL: https://gitlab.winehq.org/wine/wine/-/commit/3ca8204837ffa56064c61981fcb5128... Author: Esme Povirk <esme(a)codeweavers.com> Date: Fri Mar 1 18:54:33 2024 +0000 gdiplus: Fix use after free in GdipAddPathString. --- dlls/gdiplus/graphicspath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/gdiplus/graphicspath.c b/dlls/gdiplus/graphicspath.c index 23a9be25055..ea9c247b38c 100644 --- a/dlls/gdiplus/graphicspath.c +++ b/dlls/gdiplus/graphicspath.c @@ -1141,7 +1141,6 @@ GpStatus WINGDIPAPI GdipAddPathString(GpPath* path, GDIPCONST WCHAR* string, INT } get_log_fontW(font, graphics, &lfw); - GdipDeleteGraphics(graphics); hfont = CreateFontIndirectW(&lfw); if (!hfont) @@ -1167,6 +1166,7 @@ GpStatus WINGDIPAPI GdipAddPathString(GpPath* path, GDIPCONST WCHAR* string, INT DeleteDC(dc); DeleteObject(hfont); GdipDeleteFont(font); + GdipDeleteGraphics(graphics); if (status != Ok) /* free backup */ {
participants (1)
-
Alexandre Julliard