Skip to content

Commit

Permalink
Fix vuln OSV-2024-379
Browse files Browse the repository at this point in the history
  • Loading branch information
aled-ua committed Dec 24, 2024
1 parent f264298 commit 1126b83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/H5FSsection.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,10 @@ H5FS__sect_link_size(H5FS_sinfo_t *sinfo, const H5FS_section_class_t *cls, H5FS_

/* Determine correct bin which holds items of the section's size */
bin = H5VM_log2_gen(sect->size);
assert(bin < sinfo->nbins);
/* Check if the bin index is within bounds */
if (bin >= sinfo->nbins)
HGOTO_ERROR(H5E_FSPACE, H5E_BADVALUE, FAIL, "bin index out of bounds");

if (sinfo->bins[bin].bin_list == NULL) {
if (NULL == (sinfo->bins[bin].bin_list = H5SL_create(H5SL_TYPE_HSIZE, NULL)))
HGOTO_ERROR(H5E_FSPACE, H5E_CANTCREATE, FAIL, "can't create skip list for free space nodes");
Expand Down

0 comments on commit 1126b83

Please sign in to comment.