commit | 02c24fa87724bb3af969463cd74dc3b3feb24740 | [log] [tgz] |
---|---|---|
author | Tejun Heo <tj@kernel.org> | Sun Aug 16 21:01:22 2009 +0900 |
committer | Jeff Garzik <jgarzik@redhat.com> | Tue Sep 08 21:17:47 2009 -0400 |
tree | 8ffcdc8e5aa79cc10f0658c11aaebe2d14d4aaf9 | |
parent | bd30add88cea831dfb854d564478f09ee66206b5 [diff] |
dmi: fix date handling in dmi_get_year() Year parsing in dmi_get_year() had the following two bugs. * "00" is treated as invalid instead of 2000 because zero return from simple_strtoul() is treated as error. * "0N" where N >= 8 is treated as invalid of 200N because the leading 0 is considered to specify octal. Fix the above two bugs by using endptr to detect invalid number and forcing decimal. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>