OSDN Git Service

2007-04-06 Colin Walters <walters@redhat.com>
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Apr 2007 14:28:15 +0000 (14:28 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Apr 2007 14:28:15 +0000 (14:28 +0000)
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
* jcf-io.c (open_class): Copy 'filename'.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123616 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/ChangeLog
gcc/java/jcf-io.c

index e02257f..83c3207 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-06  Colin Walters  <walters@redhat.com>
+
+       https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=161701
+       * jcf-io.c (open_class): Copy 'filename'.
+
 2007-04-03  Andrew Haley  <aph@redhat.com>
 
         * jvgenmain.c (main): Change main to use class$, not class$$.
 2007-04-03  Andrew Haley  <aph@redhat.com>
 
         * jvgenmain.c (main): Change main to use class$, not class$$.
index 0c9b07b..10de9d2 100644 (file)
@@ -259,7 +259,7 @@ open_class (const char *filename, JCF *jcf, int fd, const char *dep_name)
       jcf->read_ptr = jcf->buffer;
       jcf->read_end = jcf->buffer_end;
       jcf->read_state = NULL;
       jcf->read_ptr = jcf->buffer;
       jcf->read_end = jcf->buffer_end;
       jcf->read_state = NULL;
-      jcf->filename = filename;
+      jcf->filename = xstrdup (filename);
       if (read (fd, jcf->buffer, stat_buf.st_size) != stat_buf.st_size)
        {
          perror ("Failed to read .class file");
       if (read (fd, jcf->buffer, stat_buf.st_size) != stat_buf.st_size)
        {
          perror ("Failed to read .class file");