diff options
author | khali <khali> | 2010-11-18 12:44:01 +0000 |
---|---|---|
committer | khali <khali> | 2010-11-18 12:44:01 +0000 |
commit | 056c32af9b74669abd277ef504088936a30e9882 (patch) | |
tree | 2d15eeffaeb63d719a1fb9d736129a5a1a9f1e48 | |
parent | 8a2704067878feea63e0e5bfca6c59ce5e34c894 (diff) | |
download | dmidecode-056c32af9b74669abd277ef504088936a30e9882.tar.gz |
Fix length condition when decoding battery capacity. Probably not a big
deal in practice, but there's no point in checking beyond our needs.
-rw-r--r-- | dmidecode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dmidecode.c b/dmidecode.c index 63eafe8..55f1449 100644 --- a/dmidecode.c +++ b/dmidecode.c @@ -3549,7 +3549,7 @@ static void dmi_decode(const struct dmi_header *h, u16 ver) printf("\tChemistry: %s\n", dmi_battery_chemistry(data[0x09])); printf("\tDesign Capacity:"); - if (h->length < 0x1A) + if (h->length < 0x16) dmi_battery_capacity(WORD(data + 0x0A), 1); else dmi_battery_capacity(WORD(data + 0x0A), data[0x15]); |