- In RealSystemParametersInfoA/SPI_GETDESKWALLPAPER, write the ansi wallpaper path directly into the user's buffer instead of using an allocation (and overrunning it). Fixes crash when running user32_winetest:sysparams with DPH.
Tangential to CORE-13097

svn path=/trunk/; revision=74370
This commit is contained in:
Thomas Faber 2017-04-18 14:31:33 +00:00
parent fc00a030f4
commit 202ae322fb

View file

@ -306,10 +306,8 @@ RealSystemParametersInfoA(UINT uiAction,
Ret = NtUserSystemParametersInfo(SPI_GETDESKWALLPAPER, MAX_PATH, awc, fWinIni);
RtlInitUnicodeString(&ustrWallpaper, awc);
RtlUnicodeStringToAnsiString(&astrWallpaper, &ustrWallpaper, TRUE);
RtlCopyMemory(pvParam, astrWallpaper.Buffer, uiParam);
RtlFreeAnsiString(&astrWallpaper);
RtlInitEmptyAnsiString(&astrWallpaper, pvParam, uiParam);
RtlUnicodeStringToAnsiString(&astrWallpaper, &ustrWallpaper, FALSE);
return Ret;
}