shell32: handle corrupt entry in iconcache registry entry (Coverity).
This commit is contained in:
parent
478592cd3d
commit
265c959ed9
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue