summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-07-12 21:22:19 +0200
committerChristian Grothoff <christian@grothoff.org>2018-07-12 21:22:19 +0200
commitad19e7fe0adc99d5710eff1ed48d91a7b75a950e (patch)
tree96eca5057d0a32606c8c724a62ec24705985463e
parent4348024d220b1da6ad56d9a4da2e3fdca66574bf (diff)
fix stack smashing issue reported by 54kinghuang@163.com as crash-19b19795b4eb9a0b31689ba9bf2c08d4c2de0621 on the mailinglist
-rw-r--r--src/common/unzip.c2
1 files changed, 1 insertions, 1 deletions
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);
https://gnunet.org