Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[linux-2.6-microblaze.git] / fs / udf / inode.c
index 5df554a..ae796e1 100644 (file)
@@ -1357,6 +1357,12 @@ reread:
 
        iinfo->i_alloc_type = le16_to_cpu(fe->icbTag.flags) &
                                                        ICBTAG_FLAG_AD_MASK;
+       if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_SHORT &&
+           iinfo->i_alloc_type != ICBTAG_FLAG_AD_LONG &&
+           iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) {
+               ret = -EIO;
+               goto out;
+       }
        iinfo->i_unique = 0;
        iinfo->i_lenEAttr = 0;
        iinfo->i_lenExtents = 0;