Is there currently any way to check the type of an attribute?
I currently see only the interface readAttribute(int32_t id, const char *dataName, const char *attrName, void* data) which completely ignores the type. So reading a double when a float was expected leads to buffer overflows. Even worse for unexpected array attributes.
Especially for multidimensional values this is a problem. You cannot read a value, that may have multiple dimensions as you don't know how many values are in the HDF5 file.
Is there currently any way to check the type of an attribute? I currently see only the interface
readAttribute(int32_t id, const char *dataName, const char *attrName, void* data)
which completely ignores the type. So reading adouble
when afloat
was expected leads to buffer overflows. Even worse for unexpected array attributes.Especially for multidimensional values this is a problem. You cannot read a value, that may have multiple dimensions as you don't know how many values are in the HDF5 file.
ccing @slizzered @ax3l