user32: fix potential crash when loading unsupported files
vitperov at etersoft.ru
Wed Jul 27 09:13:26 CDT 2011
It fixes crash in LoadCursorFromFile when loading large jpg, png or gif files.
Generally, jpg, png or gif files have different internal structures. They can
not be opened as CURSORICONFILEDIR structure.
If it happens, all the fields (idType, idReserved and idCount) are incorrect.
For a small files Wine luckily doesn't crash because of the contition:
> if ( filesize < (sizeof(*dir) + sizeof(dir->idEntries)*(dir->idCount-1)) )
> goto end;
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 731 bytes
Desc: not available
More information about the wine-patches