summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorSean McBride <sean@rogue-research.com>2022-01-28 16:34:57 (GMT)
committerGitHub <noreply@github.com>2022-01-28 16:34:57 (GMT)
commitb5eed1b56324fc07154c2e2d8251d2b87505ca23 (patch)
treeb3e3840a886966ae07e50a69ab7492ebe4df876c /src/H5private.h
parent44de59b642c4d5ccf505a1072d10b63dc9fe0628 (diff)
downloadhdf5-b5eed1b56324fc07154c2e2d8251d2b87505ca23.zip
hdf5-b5eed1b56324fc07154c2e2d8251d2b87505ca23.tar.gz
hdf5-b5eed1b56324fc07154c2e2d8251d2b87505ca23.tar.bz2
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>
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5private.h b/src/H5private.h
index 5b0e33b..fa52e7f 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -172,7 +172,7 @@
*/
#define BEGIN_MPE_LOG \
if (H5_MPEinit_g) { \
- sprintf(p_event_start, "start %s", __func__); \
+ snprintf(p_event_start, sizeof(p_event_start), "start %s", __func__); \
if (eventa(__func__) == -1 && eventb(__func__) == -1) { \
const char *p_color = "red"; \
eventa(__func__) = MPE_Log_get_event_number(); \