Merge pull request #4063 from guidovranken/zd12328

Fix length calculations in Base64_SkipNewline
This commit is contained in:
Sean Parkinson
2021-06-08 10:55:15 +10:00
committed by GitHub

View File

@ -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;