base/dispatch.c: Stop parsing the auxiliary vector when we hit `AT_NULL'.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 18 May 2016 09:29:03 +0000 (10:29 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 22 May 2016 14:58:03 +0000 (15:58 +0100)
This doesn't seem too dreadful so far (partly because nothing is using
this machinery for something important, and partly because we're parsing
the vector from a file with known length), but fix it anyway.

base/dispatch.c

index 1b0ab2b..f5a25c8 100644 (file)
@@ -359,6 +359,7 @@ static void probe_hwcaps(void)
 #define CAP__SWITCH(type, ubranch, slot)                               \
        case type: probed.slot = a->value.ubranch; break;
        WANTAUX(CAP__SWITCH)
+       case AT_NULL: goto clean;
       }
     }