commit | d4dfe13839e70dc33c0f8d335986b16a87bfa7b9 | [log] [tgz] |
---|---|---|
author | Dieter Baron <dillo@nih.at> | Tue Mar 12 11:47:27 2019 +0100 |
committer | Thomas Klausner <tk@giga.or.at> | Tue Mar 12 11:52:12 2019 +0100 |
tree | 067e473213d24ca817699ef2c9cc8b9de352e08f | |
parent | 1d949dd77339fb59605dc8f3a30f76604d693795 [diff] |
Fix AES encoding in corner case. Was triggered when length(compressed data + AES) = n * 8192 Reported by TC in https://github.com/nih-at/libzip/issues/78
diff --git a/lib/zip_source_winzip_aes_encode.c b/lib/zip_source_winzip_aes_encode.c index cf66da4..abbf7c6 100644 --- a/lib/zip_source_winzip_aes_encode.c +++ b/lib/zip_source_winzip_aes_encode.c
@@ -163,6 +163,7 @@ /* TODO: return partial read? */ return -1; } + buffer_n += _zip_buffer_read(ctx->buffer, data + ret, length - (zip_uint64_t)ret); } return (zip_int64_t)(buffer_n + (zip_uint64_t)ret);