uxtheme: Handle malformed keys a bit better (Coverity).
This commit is contained in:
parent
0dca1ebecf
commit
88bd52daaf
|
@ -364,7 +364,10 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR
|
||||||
lstrcpynW(part, comp, sizeof(part)/sizeof(part[0]));
|
lstrcpynW(part, comp, sizeof(part)/sizeof(part[0]));
|
||||||
comp = tmp;
|
comp = tmp;
|
||||||
/* now get the state */
|
/* now get the state */
|
||||||
*strchrW(comp, ')') = 0;
|
tmp = strchrW(comp, ')');
|
||||||
|
if (!tmp)
|
||||||
|
return FALSE;
|
||||||
|
*tmp = 0;
|
||||||
lstrcpynW(state, comp, sizeof(state)/sizeof(state[0]));
|
lstrcpynW(state, comp, sizeof(state)/sizeof(state[0]));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -378,7 +381,10 @@ static BOOL MSSTYLES_ParseIniSectionName(LPCWSTR lpSection, DWORD dwLen, LPWSTR
|
||||||
lstrcpynW(szClassName, comp, MAX_THEME_CLASS_NAME);
|
lstrcpynW(szClassName, comp, MAX_THEME_CLASS_NAME);
|
||||||
comp = tmp;
|
comp = tmp;
|
||||||
/* now get the state */
|
/* now get the state */
|
||||||
*strchrW(comp, ')') = 0;
|
tmp = strchrW(comp, ')');
|
||||||
|
if (!tmp)
|
||||||
|
return FALSE;
|
||||||
|
*tmp = 0;
|
||||||
lstrcpynW(state, comp, sizeof(state)/sizeof(state[0]));
|
lstrcpynW(state, comp, sizeof(state)/sizeof(state[0]));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue