Author: Jean Delvare <khali@linux-fr.org>
Description:
 Fix boundary checks of memory array location codes (DMI type 16).

diff -Naurp dmidecode.orig/CHANGELOG dmidecode/CHANGELOG
--- dmidecode.orig/CHANGELOG	2011-10-08 13:38:56.391894224 +0200
+++ dmidecode/CHANGELOG	2011-10-28 21:48:03.482573716 +0200
@@ -1,3 +1,8 @@
+2011-01-25  Jean Delvare  <khali@linux-fr.org>
+
+	* dmidecode.c: Fix boundary checks of memory array location codes
+	  (DMI type 16). Reported by Andrey Matveyev.
+
 2010-11-24  Jean Delvare  <khali@linux-fr.org>
 
 	* dmidecode.c: Assume that the max power capacity is expressed in
diff -Naurp dmidecode.orig/dmidecode.c dmidecode/dmidecode.c
--- dmidecode.orig/dmidecode.c	2011-10-08 13:38:56.395894240 +0200
+++ dmidecode/dmidecode.c	2011-10-28 21:48:03.486574269 +0200
@@ -2100,7 +2100,7 @@ static const char *dmi_memory_array_loca
 
 	if (code >= 0x01 && code <= 0x0A)
 		return location[code - 0x01];
-	if (code >= 0xA0 && code <= 0xA4)
+	if (code >= 0xA0 && code <= 0xA3)
 		return location_0xA0[code - 0xA0];
 	return out_of_spec;
 }
