diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-07-12 21:22:19 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-07-12 21:22:19 +0200 |
commit | ad19e7fe0adc99d5710eff1ed48d91a7b75a950e (patch) | |
tree | 96eca5057d0a32606c8c724a62ec24705985463e | |
parent | 4348024d220b1da6ad56d9a4da2e3fdca66574bf (diff) | |
download | libextractor-ad19e7fe0adc99d5710eff1ed48d91a7b75a950e.tar.gz libextractor-ad19e7fe0adc99d5710eff1ed48d91a7b75a950e.zip |
fix stack smashing issue reported by 54kinghuang@163.com as crash-19b19795b4eb9a0b31689ba9bf2c08d4c2de0621 on the mailinglist
-rw-r--r-- | src/common/unzip.c | 2 |
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, | |||
1347 | { | 1347 | { |
1348 | ret = ec->read (ec->cls, | 1348 | ret = ec->read (ec->cls, |
1349 | &ptr, | 1349 | &ptr, |
1350 | size); | 1350 | size - done); |
1351 | if (ret <= 0) | 1351 | if (ret <= 0) |
1352 | return done; | 1352 | return done; |
1353 | memcpy (buf + done, ptr, ret); | 1353 | memcpy (buf + done, ptr, ret); |