mirror of https://github.com/wolfSSL/wolfssl.git
sanity check on pointer
parent
61655ef56d
commit
777c89a257
|
@ -7508,13 +7508,17 @@ static int wc_EncryptedInfoParse(EncryptedInfo* info,
|
||||||
|
|
||||||
if (start == NULL)
|
if (start == NULL)
|
||||||
return BUFFER_E;
|
return BUFFER_E;
|
||||||
if (start >= bufferEnd)
|
|
||||||
return BUFFER_E;
|
|
||||||
|
|
||||||
/* skip dec-info and ": " */
|
/* skip dec-info and ": " */
|
||||||
start += XSTRLEN(kDecInfoHeader);
|
start += XSTRLEN(kDecInfoHeader);
|
||||||
if (start[0] == ':')
|
if (start >= bufferEnd)
|
||||||
|
return BUFFER_E;
|
||||||
|
|
||||||
|
if (start[0] == ':') {
|
||||||
start++;
|
start++;
|
||||||
|
if (start >= bufferEnd)
|
||||||
|
return BUFFER_E;
|
||||||
|
}
|
||||||
if (start[0] == ' ')
|
if (start[0] == ' ')
|
||||||
start++;
|
start++;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue