make sure we don't choke on attribute id 255
authorLennart Poettering <lennart@poettering.net>
Sun, 5 Apr 2009 16:51:50 +0000 (18:51 +0200)
committerLennart Poettering <lennart@poettering.net>
Sun, 5 Apr 2009 16:51:50 +0000 (18:51 +0200)
atasmart.c

index ec47a0e..7da80e0 100644 (file)
@@ -883,7 +883,7 @@ typedef struct SkSmartAttributeInfo {
 /* This data is stolen from smartmontools */
 
 /* %STRINGPOOLSTART% */
-static const SkSmartAttributeInfo const attribute_info[255] = {
+static const SkSmartAttributeInfo const attribute_info[256] = {
         [1]   = { "raw-read-error-rate",         SK_SMART_ATTRIBUTE_UNIT_NONE },
         [2]   = { "throughput-performance",      SK_SMART_ATTRIBUTE_UNIT_UNKNOWN },
         [3]   = { "spin-up-time",                SK_SMART_ATTRIBUTE_UNIT_MSECONDS },