Work around some broken zip files.

--HG--
branch : HEAD
diff --git a/lib/zip_open.c b/lib/zip_open.c
index 0ece065..44e215b 100644
--- a/lib/zip_open.c
+++ b/lib/zip_open.c
@@ -226,7 +226,10 @@
     zf->comlen = _zip_read2(&cdp);
     zf->entry = NULL;
 
-    if ((zf->comlen != comlen) || (entries != i)) {
+    /* XXX: some zip files are broken; their internal comment length
+       says 0, but they have 1 or 2 comment bytes */
+    if (((zf->comlen != comlen) && (zf->comlen != comlen-1) &&
+	 (zf->comlen != comlen-2)) || (entries != i)) {
 	/* comment size wrong -- too few or too many left after central dir */
 	/* or number of cdir-entries on this disk != number of cdir-entries */
 	zip_err = ZERR_NOZIP;