dmi: fix incorrect pointer subtraction, add sanity checks
commitae2dd06c076a447ec9ca8f7b02cdf15ef5e6ce15
authorH. Peter Anvin <hpa@linux.intel.com>
Tue, 26 Apr 2011 23:57:50 +0000 (26 16:57 -0700)
committerH. Peter Anvin <hpa@linux.intel.com>
Tue, 26 Apr 2011 23:57:50 +0000 (26 16:57 -0700)
tree61533baaca0abf242024c832d24b54178dafde54
parent47eda5f32f0883c91788033536a9b1c706c9c0e6
dmi: fix incorrect pointer subtraction, add sanity checks

We're dealing with BIOS-provided data, so we better do sanity checks
all over the place.

More immediately, fix a pointer-subtraction bug which would hang the
system.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
core/dmi.c