There is no point in trying to validate DIRA without these values being
available. Avoid using uninitialized stack buffer for such pointless
check.
Signed-off-by: Jouni Malinen <j@w1.fi>
pos2 += 6;
if (hexstr2bin(pos2, nonce, sizeof(nonce)) < 0)
return -1;
+ } else {
+ return -1;
}
pos2 = os_strstr(pos, "tag=");
pos2 += 4;
if (hexstr2bin(pos2, tag, sizeof(tag)) < 0)
return -1;
+ } else {
+ return -1;
}
return wpas_p2p_validate_dira(wpa_s, addr, 0, nonce, tag);