[prev in list] [next in list] [prev in thread] [next in thread]
List: git-commits-head
Subject: arch/x86/kernel/pci-calgary_64.c: change simple_strtol to simple_strtoul
From: Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date: 2008-11-30 22:00:02
Message-ID: 200811302200.mAUM02S3001997 () hera ! kernel ! org
[Download RAW message or body]
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=eff79aee91dd07e944df65fa448c8baeee7709d8
Commit: eff79aee91dd07e944df65fa448c8baeee7709d8
Parent: 5cf02b7bafddb6c3c16ddfb23d3ce187f70528ba
Author: Julia Lawall <julia@diku.dk>
AuthorDate: Tue Nov 25 14:13:03 2008 +0100
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Tue Nov 25 15:56:03 2008 +0100
arch/x86/kernel/pci-calgary_64.c: change simple_strtol to simple_strtoul
Impact: fix theoretical option string parsing overflow
Since bridge is unsigned, it would seem better to use simple_strtoul that
simple_strtol.
A simplified version of the semantic patch that makes this change is as
follows: (http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@r2@
long e;
position p;
@@
e = simple_strtol@p(...)
@@
position p != r2.p;
type T;
T e;
@@
e =
- simple_strtol@p
+ simple_strtoul
(...)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: muli@il.ibm.com
Cc: jdmason@kudzu.us
Cc: discuss@x86-64.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/pci-calgary_64.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c
index e1e731d..d28bbdc 100644
--- a/arch/x86/kernel/pci-calgary_64.c
+++ b/arch/x86/kernel/pci-calgary_64.c
@@ -1567,7 +1567,7 @@ static int __init calgary_parse_options(char *p)
++p;
if (*p == '\0')
break;
- bridge = simple_strtol(p, &endp, 0);
+ bridge = simple_strtoul(p, &endp, 0);
if (p == endp)
break;
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic