Source
715
715
if(NULL == p)
716
716
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "decode buffer is NULL")
717
717
718
718
/* Get the version number of the encoded property list */
719
719
vers = (uint8_t)*p++;
720
720
if((uint8_t)H5P_ENCODE_VERS != vers)
721
721
HGOTO_ERROR(H5E_PLIST, H5E_VERSION, FAIL, "bad version # of encoded information, expected %u, got %u", (unsigned)H5P_ENCODE_VERS, (unsigned)vers)
722
722
723
723
/* Get the type of the property list */
724
724
type = (H5P_plist_type_t)*p++;
725
-
if(type <= H5P_TYPE_USER || type > H5P_TYPE_LINK_ACCESS)
725
+
if(type <= H5P_TYPE_USER || type >= H5P_TYPE_MAX_TYPE)
726
726
HGOTO_ERROR(H5E_PLIST, H5E_BADRANGE, FAIL, "bad type of encoded information: %u", (unsigned)type)
727
727
728
728
/* Create new property list of the specified type */
729
729
if((plist_id = H5P__new_plist_of_type(type)) < 0)
730
730
HGOTO_ERROR(H5E_PLIST, H5E_VERSION, FAIL, "can't create property list of type: %u\n", (unsigned)type);
731
731
732
732
/* Get the property list object */
733
733
if(NULL == (plist = (H5P_genplist_t *)H5I_object(plist_id)))
734
734
HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a property class")
735
735