Patch for h5dump fixes memory corruption (double free)

Dear HDF community,

The patch in the attached file fixes a memory corruption (double free)
issue in the h5dump utility.

That bug can be reproduced by supplying one existing file and one non
existing file at the command line as you can see below:

$h5dump test/test_filters_be.h5 test/non_existing.h5
HDF5 "test/test_filters_be.h5" {
GROUP "/" {
   DATASET "dset" {
      DATATYPE H5T_STD_I32BE
      DATASPACE SIMPLE { ( 2 ) / ( 2 ) }
      DATA {
      (0): 1, 1
      }
   }
}
}
h5dump error: unable to open file "test/non_existing.h5"
*** Error in `h5dump': double free or corruption (out):
0x00000000006e67b0 ***
Aborted

Best regards,
Reinhard Resch

h5dump.patch (663 Bytes)

Reinhard,

Thank you for reporting the problem and providing the patch. I created a JIRA issue HDFFV-9639. We will review the patch this week.

Elena

···

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Elena Pourmal The HDF Group http://hdfgroup.org
1800 So. Oak St., Suite 203, Champaign IL 61820
217.531.6112
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

On Jan 3, 2016, at 7:37 AM, Reinhard Resch <aon.913455645@aon.at> wrote:

Dear HDF community,

The patch in the attached file fixes a memory corruption (double free)
issue in the h5dump utility.

That bug can be reproduced by supplying one existing file and one non
existing file at the command line as you can see below:

$h5dump test/test_filters_be.h5 test/non_existing.h5
HDF5 "test/test_filters_be.h5" {
GROUP "/" {
  DATASET "dset" {
     DATATYPE H5T_STD_I32BE
     DATASPACE SIMPLE { ( 2 ) / ( 2 ) }
     DATA {
     (0): 1, 1
     }
  }
}
}
h5dump error: unable to open file "test/non_existing.h5"
*** Error in `h5dump': double free or corruption (out):
0x00000000006e67b0 ***
Aborted

Best regards,
Reinhard Resch
<h5dump.patch>_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5