forked from wolfSSL/wolfssl
Merge pull request #4063 from guidovranken/zd12328
Fix length calculations in Base64_SkipNewline
This commit is contained in:
@@ -136,12 +136,15 @@ static WC_INLINE int Base64_SkipNewline(const byte* in, word32 *inLen, word32 *o
|
|||||||
WOLFSSL_MSG("Bad end of line in Base64 Decode");
|
WOLFSSL_MSG("Bad end of line in Base64 Decode");
|
||||||
return ASN_INPUT_E;
|
return ASN_INPUT_E;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (len) {
|
||||||
curChar = in[j];
|
curChar = in[j];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
while (len && curChar == ' ') {
|
while (len && curChar == ' ') {
|
||||||
/* skip whitespace at beginning of line */
|
if (--len > 0) {
|
||||||
curChar = in[++j];
|
curChar = in[++j];
|
||||||
len--;
|
}
|
||||||
}
|
}
|
||||||
if (!len) {
|
if (!len) {
|
||||||
return BUFFER_E;
|
return BUFFER_E;
|
||||||
|
Reference in New Issue
Block a user