summaryrefslogtreecommitdiffstats
path: root/tools/src/h5perf/sio_engine.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2022-07-01 19:53:45 (GMT)
committerGitHub <noreply@github.com>2022-07-01 19:53:45 (GMT)
commit6aa7aeeda415287c3995fe3140bda86445023ab5 (patch)
tree77ebd53724d712619ace9cf2c7d1cbdfc83e3d63 /tools/src/h5perf/sio_engine.c
parent9e97a22b8bb7cc92f0b2ef2b63de61e9da50aba6 (diff)
downloadhdf5-6aa7aeeda415287c3995fe3140bda86445023ab5.zip
hdf5-6aa7aeeda415287c3995fe3140bda86445023ab5.tar.gz
hdf5-6aa7aeeda415287c3995fe3140bda86445023ab5.tar.bz2
Fixes a bug in h5perf that causes file open failures (#1846)
When the filename was flipped from being a static array to being dynamically allocated, the sizeof(filename) call wasn't updated. This always returns the size of the pointer, truncating the filename.
Diffstat (limited to 'tools/src/h5perf/sio_engine.c')
-rw-r--r--tools/src/h5perf/sio_engine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/src/h5perf/sio_engine.c b/tools/src/h5perf/sio_engine.c
index e113e82..7781f80 100644
--- a/tools/src/h5perf/sio_engine.c
+++ b/tools/src/h5perf/sio_engine.c
@@ -203,7 +203,7 @@ do_sio(parameters param, results *res)
/* Open file for write */
HDstrcpy(base_name, "#sio_tmp");
- sio_create_filename(iot, base_name, fname, sizeof(fname), &param);
+ sio_create_filename(iot, base_name, fname, FILENAME_MAX, &param);
if (sio_debug_level > 0)
HDfprintf(output, "data filename=%s\n", fname);