projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12e9f62
)
evp: prevent underflow in base64 decoding
author
Geoff Thorpe
<geoff@openssl.org>
Sun, 4 May 2014 22:44:14 +0000
(18:44 -0400)
committer
Geoff Thorpe
<geoff@openssl.org>
Tue, 6 May 2014 21:52:19 +0000
(17:52 -0400)
This patch resolves RT ticket #2608.
Thanks to Robert Dugal for originally spotting this, and to David
Ramos for noticing that the ball had been dropped.
Signed-off-by: Geoff Thorpe <geoff@openssl.org>
crypto/evp/encode.c
patch
|
blob
|
history
diff --git
a/crypto/evp/encode.c
b/crypto/evp/encode.c
index e278a1b5d400fd95ce6fd09f51f7af1666acc0a0..a4f7674d9dac89797d6ce9507c596360211de400 100644
(file)
--- a/
crypto/evp/encode.c
+++ b/
crypto/evp/encode.c
@@
-324,6
+324,7
@@
int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
v=EVP_DecodeBlock(out,d,n);
n=0;
if (v < 0) { rv=0; goto end; }
+ if (eof > v) { rv=-1; goto end; }
ret+=(v-eof);
}
else