Commit 8bef0925 by Tom Tromey Committed by Tom Tromey

jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of file name in resource buffer.

	* jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
	file name in resource buffer.

From-SVN: r61694
parent b4862477
2003-01-23 Tom Tromey <tromey@redhat.com>
* jcf-parse.c (parse_zip_file_entries): Overwrite trailing \0 of
file name in resource buffer.
2003-01-23 Tom Tromey <tromey@redhat.com>
* expr.c (build_known_method_ref): Use method's context to find
method table index.
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment