Skip to content

Commit

Permalink
Fix bad length in snprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Dec 16, 2024
1 parent f5d0281 commit cd9e087
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
matrix:
os: [ubuntu-22.04, ubuntu-latest]
build_system: ["autotools", "cmake"]
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.10"]
hdf5-branch: ["hdf5_1_14", "develop"]
compiler: ["gcc-11", "gcc-12", "gcc-13"]
exclude:
Expand Down
2 changes: 1 addition & 1 deletion src/rest_vol.c
Original file line number Diff line number Diff line change
Expand Up @@ -3166,7 +3166,7 @@ RV_convert_dataspace_shape_to_JSON(hid_t space_id, char **shape_body, char **max
else {
if ((bytes_printed =
snprintf(maxdims_out_string_curr_pos,
maxdims_out_string_new_len - (size_t)maxdims_out_string_curr_pos,
maxdims_out_string_new_len - (size_t)buf_ptrdiff,
"%s%" PRIuHSIZE, i > 0 ? "," : "", maxdims[i])) < 0)
FUNC_GOTO_ERROR(H5E_DATASPACE, H5E_SYSERRSTR, FAIL, "snprintf error");
maxdims_out_string_curr_pos += bytes_printed;
Expand Down
16 changes: 5 additions & 11 deletions src/rest_vol_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
/* Define to 1 if you have the <mach/mach_time.h> header file. */
#undef HAVE_MACH_MACH_TIME_H

/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H

/* Define to 1 if you have the <setjmp.h> header file. */
#undef HAVE_SETJMP_H

Expand All @@ -45,9 +48,6 @@
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H

/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H

/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H

Expand Down Expand Up @@ -81,9 +81,6 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H

/* Whether HDF5 version is at least 2.0.0 */
#undef HDF5_2

/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR

Expand Down Expand Up @@ -114,13 +111,10 @@
/* The size of `off_t', as computed by sizeof. */
#undef SIZEOF_OFF_T

/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. This
macro is obsolete. */
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME

/* Define to have the REST VOL track memory usage. */
Expand Down

0 comments on commit cd9e087

Please sign in to comment.