From 639fb1d2cec8f2407e025f18d0e2d0b595cebac4 Mon Sep 17 00:00:00 2001 From: Haogang Chen Date: Mon, 28 May 2012 14:21:55 -0400 Subject: [PATCH] --- yaml --- r: 309958 b: refs/heads/master c: 967ac8af4475ce45474800709b12137aa7634c77 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ext4/resize.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index fd3619d86c5e..d59539b7d04c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9d99012ff26380a09092a9fddbb6e5f996dc631f +refs/heads/master: 967ac8af4475ce45474800709b12137aa7634c77 diff --git a/trunk/fs/ext4/resize.c b/trunk/fs/ext4/resize.c index a58ce7c507ae..05c7979226e5 100644 --- a/trunk/fs/ext4/resize.c +++ b/trunk/fs/ext4/resize.c @@ -161,6 +161,8 @@ static struct ext4_new_flex_group_data *alloc_flex_gd(unsigned long flexbg_size) if (flex_gd == NULL) goto out3; + if (flexbg_size >= UINT_MAX / sizeof(struct ext4_new_flex_group_data)) + goto out2; flex_gd->count = flexbg_size; flex_gd->groups = kmalloc(sizeof(struct ext4_new_group_data) *