From 918d6e7e2024e788c475cde9ec873e9f3d670380 Mon Sep 17 00:00:00 2001 From: Roel Kluin Date: Fri, 16 Oct 2009 14:00:17 +0200 Subject: [PATCH] --- yaml --- r: 167834 b: refs/heads/master c: 774b1382106529ad963d011931c1b911db05be68 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/mtd/ubi/build.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 6d2cde5fff9b..e85e63f9faf1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2eadaad67b2b6bd132eda105128d2d466298b8e3 +refs/heads/master: 774b1382106529ad963d011931c1b911db05be68 diff --git a/trunk/drivers/mtd/ubi/build.c b/trunk/drivers/mtd/ubi/build.c index e1f7d0a78b9d..14cec04c34f9 100644 --- a/trunk/drivers/mtd/ubi/build.c +++ b/trunk/drivers/mtd/ubi/build.c @@ -42,6 +42,7 @@ #include #include #include +#include #include "ubi.h" /* Maximum length of the 'mtd=' parameter */ @@ -1257,7 +1258,7 @@ static int __init bytes_str_to_int(const char *str) unsigned long result; result = simple_strtoul(str, &endp, 0); - if (str == endp || result < 0) { + if (str == endp || result >= INT_MAX) { printk(KERN_ERR "UBI error: incorrect bytes count: \"%s\"\n", str); return -EINVAL;