• T
    dmi: fix date handling in dmi_get_year() · 02c24fa8
    Tejun Heo 提交于
    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: NTejun Heo <tj@kernel.org>
    Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
    02c24fa8
dmi_scan.c 14.8 KB