aboutsummaryrefslogtreecommitdiffstats
path: root/libfonts_char_is_in_subset.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libfonts_char_is_in_subset.c4
1 files changed, 3 insertions, 1 deletions
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)