summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authormin7.choi <min7.choi@samsung.com>2017-06-12 10:37:37 +0900
committerjaekuk, lee <juku1999@samsung.com>2017-06-12 14:19:12 +0900
commit14ffe02a45aeb34b0c535b74dae8c97bec123885 (patch)
tree8c1ec31e1317b6fe10de35a1540c87b22fb9746c /deps
parentdd601292373e88ff6bdff128f8f4614c8e1f31af (diff)
downloadnodejs-14ffe02a45aeb34b0c535b74dae8c97bec123885.tar.gz
nodejs-14ffe02a45aeb34b0c535b74dae8c97bec123885.tar.bz2
nodejs-14ffe02a45aeb34b0c535b74dae8c97bec123885.zip
Avoid overflow in MDC2_Update()
Change-Id: I11dfad2f10827602680ff348534f7afe8299da54 Signed-off-by: min7.choi <min7.choi@samsung.com>
Diffstat (limited to 'deps')
-rw-r--r--deps/openssl/openssl/crypto/mdc2/mdc2dgst.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/openssl/openssl/crypto/mdc2/mdc2dgst.c b/deps/openssl/openssl/crypto/mdc2/mdc2dgst.c
index 6615cf84d..2dce49363 100644
--- a/deps/openssl/openssl/crypto/mdc2/mdc2dgst.c
+++ b/deps/openssl/openssl/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;