summaryrefslogtreecommitdiffstats
path: root/src/H5Bcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Bcache.c')
-rw-r--r--src/H5Bcache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5Bcache.c b/src/H5Bcache.c
index c0fd121..68fb920 100644
--- a/src/H5Bcache.c
+++ b/src/H5Bcache.c
@@ -152,6 +152,10 @@ H5B_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *_udata)
/* entries used */
UINT16DECODE(p, bt->nchildren);
+ /* Check if bt->nchildren is greater than two_k */
+ if(bt->nchildren > shared->two_k)
+ HGOTO_ERROR(H5E_BTREE, H5E_BADVALUE, NULL, "number of children is greater than maximum")
+
/* sibling pointers */
H5F_addr_decode(udata->f, (const uint8_t **)&p, &(bt->left));
H5F_addr_decode(udata->f, (const uint8_t **)&p, &(bt->right));