From ad19e7fe0adc99d5710eff1ed48d91a7b75a950e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 12 Jul 2018 21:22:19 +0200 Subject: fix stack smashing issue reported by 54kinghuang@163.com as crash-19b19795b4eb9a0b31689ba9bf2c08d4c2de0621 on the mailinglist --- src/common/unzip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/unzip.c b/src/common/unzip.c index 0de7778..a13f129 100644 --- a/src/common/unzip.c +++ b/src/common/unzip.c @@ -1347,7 +1347,7 @@ ec_read_file_func (voidpf opaque, { ret = ec->read (ec->cls, &ptr, - size); + size - done); if (ret <= 0) return done; memcpy (buf + done, ptr, ret); -- cgit v1.2.3