diff options
author | Sean McBride <sean@rogue-research.com> | 2022-01-28 16:34:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-28 16:34:57 (GMT) |
commit | b5eed1b56324fc07154c2e2d8251d2b87505ca23 (patch) | |
tree | b3e3840a886966ae07e50a69ab7492ebe4df876c /config | |
parent | 44de59b642c4d5ccf505a1072d10b63dc9fe0628 (diff) | |
download | hdf5-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 'config')
-rw-r--r-- | config/cmake_ext_mod/HDFTests.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/config/cmake_ext_mod/HDFTests.c b/config/cmake_ext_mod/HDFTests.c index c434be5..2b2a202 100644 --- a/config/cmake_ext_mod/HDFTests.c +++ b/config/cmake_ext_mod/HDFTests.c @@ -115,8 +115,8 @@ int main(void) for (currentArg = llwidthArgs; *currentArg != NULL; currentArg++) { char formatString[64]; - sprintf(formatString, "%%%sd", *currentArg); - sprintf(s, formatString, x); + snprintf(formatString, sizeof(formatString), "%%%sd", *currentArg); + snprintf(s, 128, formatString, x); if (strcmp(s, "1099511627776") == 0) { printf("PRINTF_LL_WIDTH=[%s]\n", *currentArg); |