[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Tue, 7 Jul 2009 22:36:30 +0200
From: Jiri Slaby <jirislaby@...il.com>
To: akpm@...ux-foundation.org
Cc: leo@...co.de, linux-kernel@...r.kernel.org,
Jiri Slaby <jirislaby@...il.com>
Subject: [PATCH 1/1] DMI: fix dmi_get_year year parsing
Don't guess a year number base. Use 10 instead, since year may
be 2-digit starting with 0, so that we would end up in base equal
to 8.
Signed-off-by: Jiri Slaby <jirislaby@...il.com>
Reported-by: Matthias Pfaller <leo@...co.de>
---
drivers/firmware/dmi_scan.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 6071078..8fe0f6e 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -611,7 +611,7 @@ int dmi_get_year(int field)
return 0;
s += 1;
- year = simple_strtoul(s, NULL, 0);
+ year = simple_strtoul(s, NULL, 10);
if (year && year < 100) { /* 2-digit year */
year += 1900;
if (year < 1996) /* no dates < spec 1.0 */
--
1.6.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists