summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5Olink.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5Olink.c b/src/H5Olink.c
index 6146bbb..dabf87e 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -239,6 +239,8 @@ H5O__link_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSE
/* A UD link. Get the user-supplied data */
UINT16DECODE(p, len)
+ if (lnk->type == H5L_TYPE_EXTERNAL && len < 3)
+ HGOTO_ERROR(H5E_OHDR, H5E_OVERFLOW, NULL, "external link information length < 3")
lnk->u.ud.size = len;
if (len > 0) {
/* Make sure that length doesn't exceed buffer size, which could