From 5b4a60b61ef83705bdb6556e45f21a4ca7dec6b0 Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 10 Jul 2012 17:58:04 +0200 Subject: [PATCH] --- yaml --- r: 316706 b: refs/heads/master c: 57b9655d01ef057a523e810d29c37ac09b80eead h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/udf/super.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 86dc32737916..fc73bffeb254 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 44f4f729e7a143b08bd63c33cb78b3181d9f4716 +refs/heads/master: 57b9655d01ef057a523e810d29c37ac09b80eead diff --git a/trunk/fs/udf/super.c b/trunk/fs/udf/super.c index 8a7583867811..dcbf98722afc 100644 --- a/trunk/fs/udf/super.c +++ b/trunk/fs/udf/super.c @@ -1340,7 +1340,7 @@ static int udf_load_logicalvol(struct super_block *sb, sector_t block, BUG_ON(ident != TAG_IDENT_LVD); lvd = (struct logicalVolDesc *)bh->b_data; table_len = le32_to_cpu(lvd->mapTableLength); - if (sizeof(*lvd) + table_len > sb->s_blocksize) { + if (table_len > sb->s_blocksize - sizeof(*lvd)) { udf_err(sb, "error loading logical volume descriptor: " "Partition table too long (%u > %lu)\n", table_len, sb->s_blocksize - sizeof(*lvd));