diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2022-04-05 13:20:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-05 13:20:19 (GMT) |
commit | bddd148fd29deb18439767c416199914845431b8 (patch) | |
tree | 9afaa591016c2ae1fe1978d4573c80303420d922 /tools/src | |
parent | 99ba670f6add3bf83c0361537230e686f3976d1e (diff) | |
download | hdf5-bddd148fd29deb18439767c416199914845431b8.zip hdf5-bddd148fd29deb18439767c416199914845431b8.tar.gz hdf5-bddd148fd29deb18439767c416199914845431b8.tar.bz2 |
Misc fixes from develop nov21 - feb22 (#1580)
* Make default to build high-level tools the same as default for (#1234)
high-level library.
* Updated README.txt to README.md (#1375)
* H5Lexists docs: Removed reference to 1.8.16 since the change is the 1.8.x releases, HDFFV-11289
* H5Oget_info_by_name, name can be any object, not just a group
* Converted README.txt to README.md and updated files referring to README.txt to README.md.
* removed references to README.txt
* updated MANIFEST
* Snprintf2 (#1399)
* Replaced many uses of sprintf with safer snprintf
Many very straightforward, but in a few cases added a length parameter to some private functions, because buffer length was otherwise unknowable.
* Removed unnecessary use of static on small buffers
This improves thread safety.
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Replaced several uses of sprintf with safer snprintf (#1383)
* Replaced several uses of sprintf with safer snprintf
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Used clang-tidy to change all floating point f suffixes to F (#1359)
* Added another missing override keyword on a dtor (#1384)
* Creating FUNDING.yml (#1427)
* Creating FUNDING.yml
Will add sponsor this project widget to the repo's page.
* Correct file name
Add sponsor widget; filename typo fixed.
* Update MANIFEST
* Fixed AbstractDs::getVarLenType documentation (#1441)
* Committing clang-format changes
* Open bsd fixes (#1195)
* Fix end of line alignment.
Co-authored-by: Scot Breitenfeld <brtnfld@hdfgroup.org>
Co-authored-by: Sean McBride <sean@rogue-research.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: loricooperhdf <lori.cooper@hdfgroup.org>
Co-authored-by: myd7349 <myd7349@gmail.com>
Diffstat (limited to 'tools/src')
-rw-r--r-- | tools/src/h5dump/h5dump_ddl.c | 4 | ||||
-rw-r--r-- | tools/src/h5dump/h5dump_xml.c | 4 | ||||
-rw-r--r-- | tools/src/h5import/h5import.c | 2 | ||||
-rw-r--r-- | tools/src/h5perf/pio_engine.c | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c index dd95b3c..bb495f2 100644 --- a/tools/src/h5dump/h5dump_ddl.c +++ b/tools/src/h5dump/h5dump_ddl.c @@ -838,7 +838,7 @@ dump_group(hid_t gid, const char *name) type = H5Dget_type(dset); H5Otoken_to_str(dset, &type_table->objs[u].obj_token, &obj_tok_str); - HDsprintf(type_name, "#%s", obj_tok_str); + HDsnprintf(type_name, sizeof(type_name), "#%s", obj_tok_str); H5free_memory(obj_tok_str); dump_function_table->dump_named_datatype_function(type, type_name); @@ -1970,7 +1970,7 @@ handle_datatypes(hid_t fid, const char *type, void H5_ATTR_UNUSED *data, int pe, /* unnamed datatype */ H5Otoken_to_str(fid, &type_table->objs[idx].obj_token, &obj_tok_str); - HDsprintf(name, "/#%s", obj_tok_str); + HDsnprintf(name, sizeof(name), "/#%s", obj_tok_str); H5free_memory(obj_tok_str); if (!HDstrcmp(name, real_name)) diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index e9006b6..ccf4156 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -2804,7 +2804,7 @@ xml_dump_group(hid_t gid, const char *name) type = H5Dget_type(dset); H5Otoken_to_str(dset, &type_table->objs[u].obj_token, &obj_tok_str); - HDsprintf(type_name, "#%s", obj_tok_str); + HDsnprintf(type_name, sizeof(type_name), "#%s", obj_tok_str); H5free_memory(obj_tok_str); dump_function_table->dump_named_datatype_function(type, type_name); @@ -2897,7 +2897,7 @@ xml_dump_group(hid_t gid, const char *name) type = H5Dget_type(dset); H5Otoken_to_str(dset, &type_table->objs[u].obj_token, &obj_tok_str); - HDsprintf(type_name, "#%s", obj_tok_str); + HDsnprintf(type_name, sizeof(type_name), "#%s", obj_tok_str); H5free_memory(obj_tok_str); dump_function_table->dump_named_datatype_function(type, type_name); diff --git a/tools/src/h5import/h5import.c b/tools/src/h5import/h5import.c index a1895e6..ddd34ce 100644 --- a/tools/src/h5import/h5import.c +++ b/tools/src/h5import/h5import.c @@ -3784,7 +3784,7 @@ setDefaultValues(struct Input *in, int count) in->path.count = 1; HDstrcpy(temp, "dataset"); - HDsprintf(num, "%d", count); + HDsnprintf(num, sizeof(num), "%d", count); HDstrcat(temp, num); HDstrcpy(in->path.group[0], temp); diff --git a/tools/src/h5perf/pio_engine.c b/tools/src/h5perf/pio_engine.c index 65194b0..4eaa284 100644 --- a/tools/src/h5perf/pio_engine.c +++ b/tools/src/h5perf/pio_engine.c @@ -284,7 +284,7 @@ do_pio(parameters param) /* Open file for write */ char base_name[256]; - HDsprintf(base_name, "#pio_tmp_%lu", nf); + HDsnprintf(base_name, sizeof(base_name), "#pio_tmp_%lu", nf); pio_create_filename(iot, base_name, fname, sizeof(fname)); if (pio_debug_level > 0) HDfprintf(output, "rank %d: data filename=%s\n", pio_mpi_rank_g, fname); @@ -900,7 +900,7 @@ do_write(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nby } /* end if */ } /* end else */ - HDsprintf(dname, "Dataset_%ld", ndset); + HDsnprintf(dname, sizeof(dname), "Dataset_%ld", ndset); h5ds_id = H5DCREATE(fd->h5fd, dname, ELMT_H5_TYPE, h5dset_space_id, h5dcpl); if (h5ds_id < 0) { @@ -1881,7 +1881,7 @@ do_read(results *res, file_descr *fd, parameters *parms, long ndsets, off_t nbyt break; case PHDF5: - HDsprintf(dname, "Dataset_%ld", ndset); + HDsnprintf(dname, sizeof(dname), "Dataset_%ld", ndset); h5ds_id = H5DOPEN(fd->h5fd, dname); if (h5ds_id < 0) { HDfprintf(stderr, "HDF5 Dataset open failed\n"); |