[vlc-commits] [Git][videolan/vlc][master] vout: win32: fix buffer length passed to GetICMProfileW()
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sun Apr 19 08:04:29 UTC 2026
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
a98961e7 by Steve Lhomme at 2026-04-19T07:58:44+02:00
vout: win32: fix buffer length passed to GetICMProfileW()
The size is in WCHAR, not bytes [^1].
[^1]: https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-geticmprofilew
- - - - -
1 changed file:
- modules/video_output/win32/window.c
Changes:
=====================================
modules/video_output/win32/window.c
=====================================
@@ -312,7 +312,8 @@ static void MonitorChanged(vlc_window_t *wnd, HMONITOR monitor)
return;
wchar_t iccw[MAX_PATH];
- if (GetICMProfileW(ic, &(DWORD){ sizeof(iccw) }, iccw)) {
+ DWORD iccw_len = ARRAY_SIZE(iccw);
+ if (GetICMProfileW(ic, &iccw_len, iccw)) {
UpdateICCProfile(wnd, iccw);
} else {
UpdateICCProfile(wnd, NULL);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a98961e7c86da11d7b16319bb7b084c8bf687f54
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a98961e7c86da11d7b16319bb7b084c8bf687f54
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list