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");
|
||||
return ASN_INPUT_E;
|
||||
}
|
||||
curChar = in[j];
|
||||
|
||||
if (len) {
|
||||
curChar = in[j];
|
||||
}
|
||||
}
|
||||
while (len && curChar == ' ') {
|
||||
/* skip whitespace at beginning of line */
|
||||
curChar = in[++j];
|
||||
len--;
|
||||
if (--len > 0) {
|
||||
curChar = in[++j];
|
||||
}
|
||||
}
|
||||
if (!len) {
|
||||
return BUFFER_E;
|
||||
|
Reference in New Issue
Block a user