summaryrefslogtreecommitdiffstats
path: root/src/crypto/base64/base64.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/base64/base64.c')
-rw-r--r--src/crypto/base64/base64.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/crypto/base64/base64.c b/src/crypto/base64/base64.c
index 12a52cf..4822fb8 100644
--- a/src/crypto/base64/base64.c
+++ b/src/crypto/base64/base64.c
@@ -373,6 +373,10 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, uint8_t *out, int *out_len,
rv = 0;
goto end;
}
+ if (eof > v) {
+ rv = -1;
+ goto end;
+ }
ret += (v - eof);
} else {
eof = 1;