forked from wolfSSL/wolfssl
Fix Base64_SkipNewline such that tests pass
This commit is contained in:
@ -122,13 +122,11 @@ static WC_INLINE int Base64_SkipNewline(const byte* in, word32 *inLen, word32 *o
|
|||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
return BUFFER_E;
|
return BUFFER_E;
|
||||||
}
|
}
|
||||||
|
curChar = in[j];
|
||||||
|
|
||||||
curChar = in[j++];
|
while (len > 1 && curChar == ' ') {
|
||||||
len--;
|
|
||||||
|
|
||||||
while (len && curChar == ' ') {
|
|
||||||
/* skip whitespace in the middle or end of line */
|
/* skip whitespace in the middle or end of line */
|
||||||
curChar = in[j++];
|
curChar = in[++j];
|
||||||
len--;
|
len--;
|
||||||
}
|
}
|
||||||
if (len && (curChar == '\r' || curChar == '\n')) {
|
if (len && (curChar == '\r' || curChar == '\n')) {
|
||||||
|
Reference in New Issue
Block a user