user32: Don't go past the end of the animated cursor data.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2019-09-30 23:11:14 +02:00 committed by Alexandre Julliard
parent a172aead8d
commit aaecc40464
1 changed files with 2 additions and 0 deletions

View File

@ -1451,6 +1451,8 @@ static void riff_find_chunk( DWORD chunk_id, DWORD chunk_type, const riff_chunk_
}
ptr += sizeof(DWORD);
if (ptr >= end)
break;
ptr += (*(const DWORD *)ptr + 1) & ~1;
ptr += sizeof(DWORD);
}