Permalink
Browse files

Avoid overflow in MDC2_Update()

Thanks to Shi Lei for reporting this issue.

CVE-2016-6303

Reviewed-by: Matt Caswell <matt@openssl.org>
(cherry picked from commit 55d83bf)
  • Loading branch information...
snhenson authored and mattcaswell committed Aug 19, 2016
1 parent e95f5e0 commit 2b4029e68fd7002d2307e6c3cde0f3784eef9c83
Showing with 1 addition and 1 deletion.
  1. +1 −1 crypto/mdc2/mdc2dgst.c
@@ -91,7 +91,7 @@ int MDC2_Update(MDC2_CTX *c, const unsigned char *in, size_t len)
i = c->num;
if (i != 0) {
if (i + len < MDC2_BLOCK) {
if (len < MDC2_BLOCK - i) {
/* partial block */
memcpy(&(c->data[i]), in, len);
c->num += (int)len;

0 comments on commit 2b4029e

Please sign in to comment.