Skip to content

Commit 634e096

Browse files
authored
Fix the last valid byte in buf
1 parent 0d7b9d6 commit 634e096

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/H5Faccum.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ H5F__accum_free(H5F_shared_t *f_sh, H5FD_mem_t H5_ATTR_UNUSED type, haddr_t addr
883883

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

0 commit comments

Comments
 (0)