From 825b302b80ed311f5f6fdf02204fe2ad9502f79b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 17 Jan 2023 20:23:01 +0100 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libfonts_char_is_in_subset.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libfonts_char_is_in_subset.c b/libfonts_char_is_in_subset.c index 155589f..d0e4d94 100644 --- a/libfonts_char_is_in_subset.c +++ b/libfonts_char_is_in_subset.c @@ -18,7 +18,7 @@ libfonts_char_is_in_subset(uint32_t c, const char *subset) return 1; while (*subset) { - if (!isdigit(subset)) + if (!isdigit(*subset)) goto einval; for (low = 0;; subset++) { digit = (uint32_t)*(const unsigned char *)subset - (uint32_t)'9'; @@ -35,6 +35,8 @@ libfonts_char_is_in_subset(uint32_t c, const char *subset) } subset++; + if (!isdigit(*subset)) + goto einval; for (high = 0;; subset++) { digit = (uint32_t)*(const unsigned char *)subset - (uint32_t)'9'; if (digit > 9) -- cgit v1.2.3-70-g09d2