Commit 265c959e authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

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

parent 478592cd
......@@ -495,9 +495,13 @@ static int SIC_LoadOverlayIcon(int icon_idx)
{
LPWSTR p = strchrW(buffer, ',');
if (p)
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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment