advapi32: RegSetValueExW should not crash when passed 1 instead of L"1"

Dan Kegel dank at kegel.com
Mon Aug 20 11:12:18 CDT 2012


Movavi video converter 3D crashes on startup in RegSetValueExW
because of an app bug; they passed a data pointer of 1,
and ignored the return value of ERROR_NOACCESS
( see http://bugs.winehq.org/show_bug.cgi?id=31512 ).
Tests show that on native, the W version does return ERROR_NOACCESS
instead of crashing, and the A version crashes.

Here's a patch that just checks the high word of the
data pointer, as is done in gdi32.GetObject().

( I have another patch that uses __TRY, but I think AJ prefers
the minimalist approach. )
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bool-small.patch
Type: application/octet-stream
Size: 2061 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120820/f0b1d579/attachment.obj>


More information about the wine-patches mailing list