Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions wolfcrypt/src/evp.c
Original file line number Diff line number Diff line change
Expand Up @@ -13062,20 +13062,26 @@ int wolfSSL_EVP_DecodeUpdate(WOLFSSL_EVP_ENCODE_CTX* ctx,
return 1;

}
/* if the last data is '\n', remove it */
c = in[j - 1];
if (c == '\n') {
c = (in[j - 2]);
/* If the last data is '\n', remove it */
if (j > 0) {
c = in[j - 1];
if (c == '\n' && (j > 1)) {
c = (in[j - 2]);
if (c == '=')
return 0;
else
return 1;
} else if (c == '\n') {
return 1;
}
if (c == '=')
return 0;
else
return 1;
}
if (c == '=')
return 0;
else
return 1;

/* j == 0 */
return 1;
}
/* wolfSSL_EVP_DecodeFinal decode remaining data in ctx
* to outputs to out.
Expand Down