Commit Graph

6824 Commits

Author SHA1 Message Date
Binh-Minh Ribler
cf4e78b3c9 Merge pull request #2711 in HDFFV/hdf5 from bmr-HDFFV-11120 to develop
Fix HDFFV-11120 and HDFFV-11121 (CVE-2018-13870 and CVE-2018-13869)

* commit '707e30c6be1954c0027374124207e46caae68cbc':
  Fixed typos in error messages.
  Fix HDFFV-11120 and HDFFV-11121 (CVE-2018-13870 and CVE-2018-13869)
2020-07-28 19:08:19 -05:00
Binh-Minh Ribler
707e30c6be Fixed typos in error messages. 2020-07-28 12:20:13 -05:00
Dana Robinson
91f5320ff0 Updates H5Sset_extent_none() to set H5S_NULL
The API call used to set the internal H5S_NO_CLASS value which
produced errors when such a dataspace was passed to many other API
calls.

Fixes HDFFV-11027
2020-07-27 17:32:01 -07:00
Binh-Minh Ribler
303be6d7de Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into bmr-HDFFV-11120 2020-07-22 16:15:47 -05:00
Binh-Minh Ribler
88e458ac43 Fix HDFFV-11120 and HDFFV-11121 (CVE-2018-13870 and CVE-2018-13869)
Description:
    When a buffer overflow occurred because a name length was corrupted
    and became very large, h5dump produced a segfault on one file and a
    memcpy parameter overlap on another file.  This commit added checks
    that detect a read pass the end of the buffer to prevent these error
    conditions.
Platforms tested:
    Linux/64 (jelly)
    SunOS 5.11 (emu)
2020-07-22 16:13:26 -05:00
Dana Robinson
74e09473c8 Merge pull request #2703 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit '242459231b40a88741cbc85df4272914b5d8bed3':
  Minor normalization with 1.10.
2020-07-20 14:04:41 -05:00
Dana Robinson
242459231b Minor normalization with 1.10. 2020-07-20 11:50:10 -07:00
Vailin Choi
9d3ea366d4 Merge pull request #2693 in HDFFV/hdf5 from ~VCHOI/my_third_fork:bugfix/HDFFV-11080-heap-use-after-free-by-the-call to develop
* commit '3023b34272cc6ada84aebfa7441a6a55afa3621c':
  Update MANIFEST. Add new test to Cmake.
  Fix for jira issue HDFFV-11080: (1) Patch up the file pointer when reading attribute of variable length datatype (2) Test to verify the fix when doing multiple threads
2020-07-17 14:27:12 -05:00
Dana Robinson
6388a6750f Minor normalization with 1.10 2020-07-17 05:17:48 -07:00
Jerome Soumagne
aa9d2bd9bc H5R: fix type conversion of references within vlen type
Update trefer.c with vlen test case
2020-07-15 21:00:36 -05:00
vchoi
4bc49d8b2b Fix for jira issue HDFFV-11080:
(1) Patch up the file pointer when reading attribute of variable length datatype
(2) Test to verify the fix when doing multiple threads
2020-07-14 10:56:33 -05:00
Dana Robinson
4305d9677b Fallback to older time functions in new timer code. 2020-07-14 05:01:22 -07:00
Dana Robinson
f5da9b1bef Merge pull request #2683 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_normalization to develop
* commit '127d1cfdf06e9c1cd264595c496a063848358a0a':
  Minor changes from normalization with 1.10
2020-07-09 15:50:43 -05:00
Dana Robinson
127d1cfdf0 Minor changes from normalization with 1.10 2020-07-09 08:34:01 -07:00
Allen Byrne
88e8597cde Small changes discovered with mingw and windows defines moved 2020-07-02 13:52:03 -05:00
Quincey Koziol
d05b58b5d4 Merge pull request #2668 in HDFFV/hdf5 from monotonic_timer to develop
* commit '7371c83f9777b34b31909e99e052398b93c31bed':
  Remove non-existent example
  Add new source files to CMake build
  Clean up warnings
  va_arg -> HDva_arg
  Refactor code to remove remaining checks for H5_HAVE_GETTIMEOFDAY scattered around in various places.  Also clean up iopipe.c.
  Correct mistake in H5_now_usec calculation for clock_gettime.
  Remove detection for mach/mach/time.h, since we're no longer using the time routines from that header.
  Update H5_now_usec to prefer using clock_gettime.
  Changes to make timers within the library monotonic.
2020-07-02 10:36:44 -05:00
Jake Smith
7cbb5fe2d1 Merge pull request #2669 in HDFFV/hdf5 from ~JAKE.SMITH/hdf5:bugfix/HDftell_macro_typo to develop
* commit 'ef05e68c38d2086c6f262744b4087f65a6e58957':
  Fix typo in HDftell macro definition: 'ftello -> ftell'
2020-06-30 13:36:01 -05:00
Quincey Koziol
c005b8f52b Merge remote-tracking branch 'origin/develop' into monotonic_timer 2020-06-30 08:52:49 -05:00
Binh-Minh Ribler
b155a77762 Changed wording in comment. 2020-06-30 00:57:46 -05:00
Binh-Minh Ribler
7c006fd761 - added comment to explain a kluge
- added the associated entry to release notes
2020-06-29 14:16:35 -05:00
Jacob Smith
ef05e68c38 Fix typo in HDftell macro definition: 'ftello -> ftell' 2020-06-29 12:09:07 -05:00
Binh-Minh Ribler
785a1cef0c Merging in latest from upstream (HDFFV/hdf5:refs/heads/develop)
* commit '30776671fb0a27a98b0640aa968f850241a862ce': (31 commits)
  * Fix intermittent error with Splitter VFD.     Mismatch in time of test file creation was creating false negatives.
  Added note for HDFFV-10591.
  Fix HDFFV-10591
  Reduce overhead for H5open, which is involved in the public symbols like H5T_NATIVE_INT, etc.
  Remove unnecessary version conditions for Clang compilers.
  Fix for HDFFV-10961: Couple changes to the tests' usage output files for h5clear.
  Fix for HDFFV-10961: add description to usage for --increment option.
  Add c++ to --enable-sanitize-checks option.
  Remove duplicate entries in MANIFEST.
  Make changes to CMake CompilerFlags.cmake files so extra flags are loaded for non-GNU compilers.
  Fix MANIFEST
  Add tests for all version to H5_NO_DEPRECATED_SYMBOLS section and to section for current version, with and without default API version flags.
  HDFFV-11000:  update-testh5cc.sh.in to test sample versioned functions in HDF5 1.10, 1.12 and develop.
  Remember the info for the last ID looked up for a given ID type.
  Eliminate allocating file & memory offset & length arrays when performing I/O on a single element.
  Update new clang files to not pick up clang as vendor for pgCC. Add new files to MANIFEST Temporary demotion of 2 -Werror warning flags that fail on macos 10.12 Remove Production flag unknown to Apple clang.
  Remove redundant metadata cache tagging from some low-level internal chunk functions.  The metadata cache tagging has already been done by routines further up the call stack.
  Clean up code to get clang version in config/linux-gnulibc1
  Minor normalizations with HDF5 1.10.
  Add flags from config/clang-warnings/*general files to H5 C and CXX flags for all versions of Clang and Clang++ compilers. Switched from cut to awk in testcheck_version.sh.in to avoid dependence on tab vs. " " in version definitions in H5public.h.
  ...
2020-06-29 11:53:55 -05:00
Quincey Koziol
71b601d0d3 Clean up warnings 2020-06-27 20:02:51 -05:00
Quincey Koziol
ee4eb09b5f va_arg -> HDva_arg 2020-06-27 13:44:24 -05:00
Quincey Koziol
7bdab523b3 Refactor code to remove remaining checks for H5_HAVE_GETTIMEOFDAY scattered around in various places. Also clean up iopipe.c. 2020-06-27 09:47:55 -05:00
Quincey Koziol
e767f44e95 Merge remote-tracking branch 'origin/develop' into monotonic_timer 2020-06-26 18:57:38 -05:00
Binh-Minh Ribler
a08ab621fe Merge pull request #2654 in HDFFV/hdf5 from bmr_HDFFV-10591 to develop
Fixed HDFFV-10591

* commit '7d58d115079d286a566207c529e59bbccc952b03':
  Added note for HDFFV-10591.
  Fix HDFFV-10591
2020-06-21 22:48:21 -05:00
Binh-Minh Ribler
c12da4884f Fix HDFFV-10591
Description:
    h52gif produced a segfault when a buffer overflow occurred because
    the data size was corrupted and became very large.  This commit added
    a check on the data size against the buffer size to prevent the segfault.
    It also added error reporting to h52gif to display an error message
    instead of silently exiting when the failure occurred.
Platforms tested:
    Linux/64 (jelly)
    SunOS 5.11 (emu)
2020-06-19 10:53:32 -05:00
Quincey Koziol
49fad72f3e Reduce overhead for H5open, which is involved in the public symbols like H5T_NATIVE_INT, etc. 2020-06-16 12:30:08 -05:00
Jake Smith
b718bf567f Merge pull request #2615 in HDFFV/hdf5 from ~JAKE.SMITH/hdf5:bugfix/splitter_valgrind_patch to develop
* commit '6462c67b6578e48c1ef6d847be59c0b5e3598a50':
  Patch a few holes in the Splitter VFD implementation.
2020-06-15 14:36:41 -05:00
Quincey Koziol
02aea018a1 Merge pull request #2635 in HDFFV/hdf5 from cache_last_id_info to develop
* commit '0ef32f07fb9e8fb6063f3318425506047454d6f4':
  Remember the info for the last ID looked up for a given ID type.
2020-06-10 13:32:14 -05:00
Quincey Koziol
030cd9fab5 Merge pull request #2634 in HDFFV/hdf5 from opt_single_selection_io to develop
* commit 'a8a4e9f27b67ae2e22970e42859225adcc2e5cbb':
  Eliminate allocating file & memory offset & length arrays when performing I/O on a single element.
2020-06-10 13:31:30 -05:00
Quincey Koziol
0ef32f07fb Remember the info for the last ID looked up for a given ID type. 2020-06-09 18:38:04 -05:00
Quincey Koziol
a8a4e9f27b Eliminate allocating file & memory offset & length arrays when performing I/O on a single element. 2020-06-09 16:24:48 -05:00
Quincey Koziol
9e8899c3b4 Remove redundant metadata cache tagging from some low-level internal chunk functions. The metadata cache tagging has already been done by routines further up the call stack. 2020-06-09 15:48:14 -05:00
Dana Robinson
56ab55be3f Merge pull request #2630 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:develop_minor to develop
* commit '87695c999ad7ea348ee6dc03b46b0bd345f7d7df':
  Minor normalizations with HDF5 1.10.
2020-06-08 08:27:52 -05:00
Dana Robinson
87695c999a Minor normalizations with HDF5 1.10. 2020-06-07 03:12:36 -07:00
Quincey Koziol
de54cff50c Detect when there's the same-shaped selection of a single block of elements on
both selections, but with different selection types (i.e. one selection defined
as an 'all' type and the other as a hyperslab or point type), without falling
into the generic selection iteration case.
2020-06-05 12:36:20 -05:00
Dana Robinson
e22d126639 Normalization of H5T.c with 1.10. 2020-06-03 23:34:16 -07:00
Dana Robinson
a0d9959b43 Normalization of H5D.c with 1.10. 2020-06-03 23:07:14 -07:00
Dana Robinson
cc15d1039a Normalizations with 1.10 branch. 2020-06-02 07:33:00 -07:00
Dana Robinson
5f0eed3fdc Normalization with hdf5_1_10 2020-06-01 11:37:52 -07:00
Jacob Smith
6462c67b65 Patch a few holes in the Splitter VFD implementation.
* Missing logfile close on driver-open failure.
* Initialize empty string in test/vfd (logfile path in W/O compat check).
2020-05-29 14:27:14 -05:00
Binh-Minh Ribler
7a4d7da14a Fix HDFFV-11053
Description:
    A superblock pointer was set to a temporary structure, as a kluge,
    and meant to be reset back to NULL after the processing was completed.
    However, in the case of failure before the completion, this setting
    caused the superblock pointer to be unpinned twice in the error
    recovery process.  As a result, that generated a segfault in h5clear.
    The fix resets the superblock pointer to NULL after H5F__super_ext_remove_msg
    fails so that h5clear can fail properly.

    Note: After the fix, when built in debug mode, there will be an
    assertion failure with the user's file, which appeared to be corrupted:
H5MM_final_sanity_check: Assertion `0 == H5MM_curr_alloc_bytes_s' failed.

    This did not happen on a good file or on the corrupted file with the
    library built in production mode.  The un-freed memory were allocated
    during error recovery.
Platforms tested:
    Linux/64 (jelly)
2020-05-26 15:39:39 -05:00
Dana Robinson
ae07c9ba24 Replaced a few calls to HDmemcpy with H5MM_memcpy, which does overlap
checking.
2020-05-15 06:44:01 -07:00
Dana Robinson
ad8f72ca29 Removed HDgets macros since gets was deprecated in C99 and removed
in C11 (gets() is not used in our repo).
2020-05-10 03:33:54 -07:00
Quincey Koziol
ac069841f3 Avoid allocating a chunk index for datasets with 0-sized dimensions, until
the dataset is extended.
2020-05-01 17:59:57 -05:00
Dana Robinson
f3d2304647 Merge pull request #2542 in HDFFV/hdf5 from ~DEROBINS/hdf5_der:warning_fixes to develop
* commit 'c3367e6634d4dee88ff855da08e312f6685c23af':
  Moved -Woverlength-strings to the developer flags.
2020-04-27 10:51:08 -05:00
Dana Robinson
c3367e6634 Moved -Woverlength-strings to the developer flags. 2020-04-26 04:22:12 -07:00
David Young
26e640da7e Fix `src/H5FDdirect.c:1346:5: error: ISO C90 forbids mixed declarations
and code [-Werror=declaration-after-statement]`.
2020-04-24 10:18:15 -05:00