From d2fd32b48176f73cf2d134d229d1ac4ea676df93 Mon Sep 17 00:00:00 2001 From: "(none)!yura" <(none)!yura> Date: Fri, 30 Jul 2004 13:00:24 +0000 Subject: [PATCH] Fix bug in ntfs_attr_size_bounds_check that caused it always fail if no maximum limit for attribute size (Logical change 1.465) --- libntfs/attrib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libntfs/attrib.c b/libntfs/attrib.c index 1a39689f..387b0d34 100644 --- a/libntfs/attrib.c +++ b/libntfs/attrib.c @@ -2127,7 +2127,7 @@ int ntfs_attr_size_bounds_check(const ntfs_volume *vol, const ATTR_TYPES type, /* We found the attribute. - Do the bounds check. */ if ((sle64_to_cpu(ad->min_size) && size < sle64_to_cpu(ad->min_size)) || - (sle64_to_cpu(ad->max_size) && size > + ((sle64_to_cpu(ad->max_size) > 0) && size > sle64_to_cpu(ad->max_size))) { /* @size is out of range! */ errno = ERANGE;