diff options
-rw-r--r-- | gcc/java/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/java/jcf-parse.c | 4 | ||||
-rw-r--r-- | gcc/java/zipfile.h | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 587178d..194edc5 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2007-11-02 Tom Tromey <tromey@redhat.com> + + PR java/33765: + * jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files. + * zipfile.h (ZIPEMPTYMAGIC): New define. + 2007-11-01 Tom Tromey <tromey@redhat.com> * Make-lang.in (java/jcf-dump.o): Depend on zipfile.h. diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index a544163..ab2a385 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -1946,6 +1946,10 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED) #endif parse_zip_file_entries (); } + else if (magic == (JCF_u4) ZIPEMPTYMAGIC) + { + /* Ignore an empty input jar. */ + } else { gcc_unreachable (); diff --git a/gcc/java/zipfile.h b/gcc/java/zipfile.h index 39e3a5f..d78226a 100644 --- a/gcc/java/zipfile.h +++ b/gcc/java/zipfile.h @@ -58,6 +58,7 @@ extern struct ZipFile *SeenZipFiles; #define ZIPDIR_NEXT(ZIPD) \ ((ZipDirectory*)((char*)(ZIPD)+(ZIPD)->direntry_size)) #define ZIPMAGIC 0x504b0304 +#define ZIPEMPTYMAGIC 0x504b0506 extern ZipFile * opendir_in_zip (const char *, int); extern int read_zip_archive (ZipFile *); |