From 2d08c64290d310037ff3a883772f74379775171c Mon Sep 17 00:00:00 2001 From: Dennis Heimbigner Date: Sun, 17 Oct 2021 13:55:03 -0600 Subject: [PATCH 1/2] Fix bug in the default HDF5 byte-range reader re: https://github.com/Unidata/netcdf-c/issues/2122 There was a string allocation error in H5FDhttp.c --- libhdf5/H5FDhttp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libhdf5/H5FDhttp.c b/libhdf5/H5FDhttp.c index 44ff597fe8..424385e1d3 100644 --- a/libhdf5/H5FDhttp.c +++ b/libhdf5/H5FDhttp.c @@ -349,7 +349,7 @@ H5FD_http_open( const char *name, unsigned flags, hid_t /*UNUSED*/ fapl_id, file->write_access = write_access; /* Note the write_access for later */ file->eof = (haddr_t)len; file->state = state; state = NULL; - file->url = H5allocate_memory(strlen(name+1),0); + file->url = H5allocate_memory(strlen(name)+1,0); if(file->url == NULL) { nc_http_close(state); H5Epush_ret(func, H5E_ERR_CLS, H5E_RESOURCE, H5E_NOSPACE, "memory allocation failed", NULL); From 3d6ab95deacc9066fcf96efea9e9aa9fb912eda8 Mon Sep 17 00:00:00 2001 From: Dennis Heimbigner Date: Sun, 17 Oct 2021 13:57:07 -0600 Subject: [PATCH 2/2] Update Release Notes --- RELEASE_NOTES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index ec0214cc0a..79893ac404 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -7,6 +7,7 @@ This file contains a high-level description of this package's evolution. Release ## 4.8.2 - TBD +* [Bug Fix] Fix string allocation error in H5FDhttp.c. See [Github #2127](https://github.com/Unidata/netcdf-c/pull/2127). * [Bug Fix] Apply patches for ezxml and for selected oss-fuzz detected errors. See [Github #2125](https://github.com/Unidata/netcdf-c/pull/2125). * [Bug Fix] Ensure that internal Fortran APIs are always defined. See [Github #2098](https://github.com/Unidata/netcdf-c/pull/2098). * [Enhancement] Support filters for NCZarr. See [Github #2101](https://github.com/Unidata/netcdf-c/pull/2101)