commit | 3ed41e900b5b4457e68829aee8786dafd9a73f7f | [log] [tgz] |
---|---|---|
author | Dieter Baron <dillo@nih.at> | Fri Oct 12 15:53:18 2012 +0200 |
committer | Dieter Baron <dillo@nih.at> | Fri Oct 12 15:53:18 2012 +0200 |
tree | a6727a1ae4adb1210125dacad9eaabc5f41490d0 | |
parent | 6fad8b67cbc9be595f6c904f302e8c672852961d [diff] [blame] |
Fix remaining llvm warnings.
diff --git a/lib/zip_file_get_offset.c b/lib/zip_file_get_offset.c index f2742ec..0bd1b10 100644 --- a/lib/zip_file_get_offset.c +++ b/lib/zip_file_get_offset.c
@@ -68,5 +68,10 @@ if ((size=_zip_dirent_size(za->zp, ZIP_EF_LOCAL, error)) < 0) return 0; + if (offset+(zip_uint32_t)size > ZIP_OFF_MAX) { + _zip_error_set(error, ZIP_ER_SEEK, EFBIG); + return 0; + } + return offset + (zip_uint32_t)size; }