Commit 653b3104 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

comctl32/ipaddress: Use array index after range check (Coverity).

parent 17345777
......@@ -384,15 +384,16 @@ static void IPADDRESS_SetFocusToField (const IPADDRESS_INFO *infoPtr, INT index)
static BOOL IPADDRESS_ConstrainField (const IPADDRESS_INFO *infoPtr, int currentfield)
{
const IPPART_INFO *part = &infoPtr->Part[currentfield];
WCHAR field[10];
static const WCHAR fmt[] = { '%', 'd', 0 };
const IPPART_INFO *part;
int curValue, newValue;
WCHAR field[10];
TRACE("(currentfield=%d)\n", currentfield);
if (currentfield < 0 || currentfield > 3) return FALSE;
part = &infoPtr->Part[currentfield];
if (!GetWindowTextW (part->EditHwnd, field, 4)) return FALSE;
curValue = atoiW(field);
......
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