Check for off_t overflow.
diff --git a/lib/zip_extra_field.c b/lib/zip_extra_field.c
index 9b9e399..d29cd76 100644
--- a/lib/zip_extra_field.c
+++ b/lib/zip_extra_field.c
@@ -262,6 +262,7 @@
struct zip_extra_field *prev, *next;
ef_head = prev = ef;
+ prev = NULL;
while (ef) {
if (ZIP_EF_IS_INTERNAL(ef->id)) {
@@ -336,7 +337,6 @@
return 0;
- /* XXX: check for off_t overflow */
if (fseeko(za->zp, (off_t)(e->orig->offset + 26), SEEK_SET) < 0) {
_zip_error_set(&za->error, ZIP_ER_SEEK, errno);
return -1;