From c6746fa3917b561f924ae34fa51945de51867aa2 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 27 Mar 2020 22:48:38 +0900 Subject: [PATCH] [qfcc] Fix out-by-one in type meta check --- tools/qfcc/source/obj_type.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/qfcc/source/obj_type.c b/tools/qfcc/source/obj_type.c index 38a28a9e8..d56cd98b9 100644 --- a/tools/qfcc/source/obj_type.c +++ b/tools/qfcc/source/obj_type.c @@ -275,7 +275,7 @@ qfo_encode_type (type_t *type) } if (type->type_def) return type->type_def; - if (type->meta > sizeof (funcs) / (sizeof (funcs[0]))) + if (type->meta >= sizeof (funcs) / (sizeof (funcs[0]))) internal_error (0, "bad type meta type"); if (!type->encoding) type->encoding = type_get_encoding (type);