[PATCH 0/1] MR7067: gdi32: Explicitly check for negative text length in GetTextExtentExPointW().
Length check was done before 3c1462afa0acee45127fe610db1c8258016e8bec at win32u side. So this could be considered a regression. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7067
From: Bernhard Übelacker <bernhardu(a)mailbox.org> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/gdi32/text.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/gdi32/text.c b/dlls/gdi32/text.c index ff548306dc3..583244fb863 100644 --- a/dlls/gdi32/text.c +++ b/dlls/gdi32/text.c @@ -1384,6 +1384,7 @@ BOOL WINAPI GetTextExtentExPointW( HDC hdc, const WCHAR *str, INT count, INT max BOOL ret = TRUE; if (!(dc_attr = get_dc_attr( hdc ))) return FALSE; + if (count < 0) return FALSE; bidi_flags = dc_attr->text_align & TA_RTLREADING ? WINE_GCPW_FORCE_RTL : WINE_GCPW_FORCE_LTR; bidi_flags |= WINE_GCPW_DISABLE_REORDERING; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7067
This merge request was approved by Nikolay Sivov. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7067
This merge request was approved by Huw Davies. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7067
participants (3)
-
Bernhard Übelacker -
Huw Davies (@huw) -
Nikolay Sivov (@nsivov)