Skip to content

Commit

Permalink
Fix the last valid byte in buf
Browse files Browse the repository at this point in the history
  • Loading branch information
aled-ua authored Jan 15, 2025
1 parent 0d7b9d6 commit 634e096
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/H5Faccum.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr

/* Ensure that the memmove operation won't overflow past the buffer's allocated size */
if (H5_IS_BUFFER_OVERFLOW(accum->buf + overlap_size, new_accum_size,
accum->buf + accum->alloc_size)) {
accum->buf + accum->alloc_size - 1)) {
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "memmove operation would overflow buffer");
}
/* Move the accumulator buffer information to eliminate the freed block */
Expand Down

0 comments on commit 634e096

Please sign in to comment.