Skip to content

Commit

Permalink
evp: prevent underflow in base64 decoding
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geoff Thorpe committed May 6, 2014
1 parent d8afda6 commit d0666f2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crypto/evp/encode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d0666f2

Please sign in to comment.