shell32: handle corrupt entry in iconcache registry entry (Coverity).

This commit is contained in:
Marcus Meissner 2009-12-03 23:47:31 +01:00 committed by Alexandre Julliard
parent 478592cd3d
commit 265c959ed9
1 changed files with 7 additions and 3 deletions

View File

@ -495,9 +495,13 @@ static int SIC_LoadOverlayIcon(int icon_idx)
{
LPWSTR p = strchrW(buffer, ',');
if (p)
*p++ = 0;
if (!p)
{
ERR("Icon index in %s/%s corrupted, no comma.\n", debugstr_w(wszShellIcons),debugstr_w(wszIdx));
RegCloseKey(hKeyShellIcons);
return -1;
}
*p++ = 0;
iconPath = buffer;
iconIdx = atoiW(p);
}