From 5847e3f26904065b44351ac971f35624d8de96a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 11 Feb 2026 10:03:29 +0800 Subject: [PATCH] FFPlatform (Windows): fixes memory corruption --- src/common/impl/FFPlatform_windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/impl/FFPlatform_windows.c b/src/common/impl/FFPlatform_windows.c index 58c6e8de1..259491cae 100644 --- a/src/common/impl/FFPlatform_windows.c +++ b/src/common/impl/FFPlatform_windows.c @@ -155,7 +155,7 @@ static void getUserName(FFPlatform* platform) if (size > 0) { FF_AUTO_FREE PSID sid = (PSID) malloc(size); - FF_AUTO_FREE LPWSTR refDomain = (LPWSTR) malloc(refDomainSize); + FF_AUTO_FREE LPWSTR refDomain = (LPWSTR) malloc(refDomainSize * sizeof(wchar_t)); if (LookupAccountNameW(NULL, buffer, sid, &size, refDomain, &refDomainSize, &sidNameUse)) { LPWSTR sidString;