]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fold data[0] by the number of types
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 27 Oct 2021 18:21:52 +0000 (14:21 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 27 Oct 2021 18:25:10 +0000 (14:25 -0400)
src/lib/util/fuzzer.c

index 4a014f7c29b885af57f77442c6a9e33e820e10ae..ed41162b532c64d03bd4d902384aa0ca625e8ce2 100644 (file)
@@ -44,7 +44,7 @@ static ssize_t util_decode_proto(TALLOC_CTX *ctx, UNUSED fr_pair_list_t *out, ui
 
        if (data_len < 1) return data_len;      /* We want to check zero length input too */
 
-       type = data[0];
+       type = data[0] % (FR_TYPE_MAX + 1);
        switch (type) {
        case FR_TYPE_LEAF:
                break;