oleaut32: Recognize icon and cursor in the being loaded data.

This commit is contained in:
Dmitry Timoshkov 2012-05-31 17:32:54 +09:00 committed by Alexandre Julliard
parent 43984f355a
commit c1136218e2
1 changed files with 2 additions and 0 deletions

View File

@ -1402,6 +1402,8 @@ static HRESULT WINAPI OLEPictureImpl_Load(IPersistStream* iface, IStream *pStm)
!memcmp(&(header[0]), "BM", 2) || /* BMP header */
!memcmp(&(header[0]), "\xff\xd8", 2) || /* JPEG header */
(header[0] == EMR_HEADER) || /* EMF header */
(header[0] == 0x10000) || /* icon: idReserved 0, idType 1 */
(header[0] == 0x20000) || /* cursor: idReserved 0, idType 2 */
(header[1] > statstg.cbSize.QuadPart)|| /* invalid size */
(header[1]==0)
) {/* Found start of bitmap data */