add check that $ATTRIBUTE_LIST should be <= 0x40000 to ntfs_attr_size_bounds_check

(Logical change 1.611)
edge.strict_endians
(none)!yura 2004-10-13 12:01:03 +00:00
parent e837874f4d
commit 01161bc99b
1 changed files with 10 additions and 0 deletions

View File

@ -2156,6 +2156,16 @@ int ntfs_attr_size_bounds_check(const ntfs_volume *vol, const ATTR_TYPES type,
errno = EINVAL;
return -1;
}
/*
* $ATTRIBUTE_LIST should be not greater than 0x40000, but this is not
* listed in the AttrDef.
*/
if (type == AT_ATTRIBUTE_LIST && size > 0x40000) {
errno = ERANGE;
return -1;
}
ad = ntfs_attr_find_in_attrdef(vol, type);
if (!ad)
return -1;