diff options
author | Mattias Andrée <maandree@kth.se> | 2023-01-17 20:23:01 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-01-17 20:23:01 +0100 |
commit | 825b302b80ed311f5f6fdf02204fe2ad9502f79b (patch) | |
tree | eb440179af301fdb325a9700dd561f7554742188 | |
parent | Add libfonts_char_is_in_subset (diff) | |
download | libfonts-825b302b80ed311f5f6fdf02204fe2ad9502f79b.tar.gz libfonts-825b302b80ed311f5f6fdf02204fe2ad9502f79b.tar.bz2 libfonts-825b302b80ed311f5f6fdf02204fe2ad9502f79b.tar.xz |
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r-- | libfonts_char_is_in_subset.c | 4 |
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) |