[PATCH v6 0/1] MR5957: win32u: fix random crash without libfreetype
without freetype, some calling return failed, so some value may not be initialized (it initialize by some failed calling and pass argument by point of it), it would cause random crash! Signed-off-by: Fan WenJie <fanwj(a)mail.ustc.edu.cn> -- v6: win32u: fix random crash without libfreetype https://gitlab.winehq.org/wine/wine/-/merge_requests/5957
From: Fan WenJie <fanwj(a)mail.ustc.edu.cn> Signed-off-by: Fan WenJie <fanwj(a)mail.ustc.edu.cn> --- dlls/win32u/sysparams.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index edf1a705168..a8b699d88ed 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -4323,6 +4323,7 @@ LONG get_char_dimensions( HDC hdc, TEXTMETRICW *metric, int *height ) 'r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H', 'I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; + if (height) *height = 0; if (metric && !NtGdiGetTextMetricsW( hdc, metric, 0 )) return 0; if (!NtGdiGetTextExtentExW( hdc, abcdW, ARRAYSIZE(abcdW), 0, NULL, NULL, &sz, 0 )) -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5957
On Sun Jul 28 04:04:52 2024 +0000, Fan WenJie wrote:
changed this line in [version 5 of the diff](/wine/wine/-/merge_requests/5957/diffs?diff_id=123968&start_sha=60c198acc689ea7499a6f83e303fb870b8213173#85770a8b187bd82db4dbb9a2b8a5f34616049d0f_4335_4334) OK, I use simple modify as your suggestion
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/5957#note_77211
participants (2)
-
Fan WenJie -
Fan WenJie (@fanwenjie)