};
bool
-blob_check_type(void *ptr, int len, int type)
+blob_check_type(const void *ptr, int len, int type)
{
- char *data = ptr;
+ const char *data = ptr;
if (type >= BLOB_ATTR_LAST)
return false;
return false;
}
- if (type == BLOB_ATTR_STRING && data[len] != 0)
+ if (type == BLOB_ATTR_STRING && data[len - 1] != 0)
return false;
return true;