linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] DMI: fix dmi_get_year year parsing
@ 2009-07-07 20:36 Jiri Slaby
  2009-07-08  6:46 ` Matthias Pfaller
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2009-07-07 20:36 UTC (permalink / raw)
  To: akpm; +Cc: leo, linux-kernel, Jiri Slaby

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@gmail.com>
Reported-by: Matthias Pfaller <leo@marco.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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-07-09  7:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-07 20:36 [PATCH 1/1] DMI: fix dmi_get_year year parsing Jiri Slaby
2009-07-08  6:46 ` Matthias Pfaller
2009-07-08  6:54   ` Jiri Slaby
2009-07-08  7:03     ` Matthias Pfaller
2009-07-09  7:12       ` DMI year "00" + ACPI [was: DMI: fix dmi_get_year year parsing] Jiri Slaby
2009-07-09  7:39         ` Matthias Pfaller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).