--- cursoricon.c.orig 2004-04-29 03:13:11.000000000 +0200 +++ cursoricon.c 2004-04-29 03:13:33.000000000 +0200 @@ -504,6 +504,9 @@ if (pos>=(LPBYTE)bits+766) goto fail; } } + else + goto fail; + if (!(entries = bits->idCount)) goto fail; size = sizeof(CURSORICONDIR) + sizeof(CURSORICONDIRENTRY) * (entries - 1); _free = (LPBYTE) size;