Skip to content

Commit e5286b5

Browse files
committed
hl: fix incorrect hvl_t comment in H5IM__class_attr_equals
VL strings use char* in memory, not hvl_t (which is only for VL sequences). Correct the comment per jhendersonHDF review on PR HDFGroup#6371.
1 parent 8f50448 commit e5286b5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

hl/src/H5IM.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,8 @@ H5IM__class_attr_equals(hid_t loc_id, const char *dset_name, const char *expecte
10101010
if (H5T_STRING != H5Tget_class(atid))
10111011
goto out;
10121012

1013-
/* Reject VLEN strings; H5Aread into a char* buffer would write an hvl_t.
1013+
/* Reject VLEN strings; H5Aread into a char* buffer would overwrite it
1014+
* with a heap-allocated char* pointer rather than the string content.
10141015
* Return 0 (not this class) rather than -1 (error): the attribute is
10151016
* well-formed, it just cannot be the expected class string. */
10161017
if ((isvl = H5Tis_variable_str(atid)) < 0)

0 commit comments

Comments
 (0)