diff options
Diffstat (limited to 'gcc/java/jcf-parse.c')
-rw-r--r-- | gcc/java/jcf-parse.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c index 7545aa1..2f03202 100644 --- a/gcc/java/jcf-parse.c +++ b/gcc/java/jcf-parse.c @@ -1221,7 +1221,9 @@ parse_zip_file_entries (void) buffer = ALLOC (zdir->filename_length + 1 + (jcf->buffer_end - jcf->buffer)); strcpy (buffer, file_name); - memcpy (buffer + zdir->filename_length + 1, + /* This is not a typo: we overwrite the trailing \0 of the + file name; this is just how the data is laid out. */ + memcpy (buffer + zdir->filename_length, jcf->buffer, jcf->buffer_end - jcf->buffer); compile_resource_data (file_name, buffer, |