From: Arran Cudbard-Bell Date: Wed, 27 Oct 2021 18:21:52 +0000 (-0400) Subject: Fold data[0] by the number of types X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d5092d0e31398361f1780e160dbef56d8deef9c;p=thirdparty%2Ffreeradius-server.git Fold data[0] by the number of types --- diff --git a/src/lib/util/fuzzer.c b/src/lib/util/fuzzer.c index 4a014f7c29b..ed41162b532 100644 --- a/src/lib/util/fuzzer.c +++ b/src/lib/util/fuzzer.c @@ -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;