summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2021-02-07 23:43:48 +0200
committerTimo Teräs <timo.teras@iki.fi>2021-02-07 23:44:49 +0200
commitab7b8e3c995eb5a05ddbaa4546cd16a10da2d836 (patch)
treebd25a85b623598baefa3c4be7d77fcc27c9fdc5e /src
parent43b0b5fac622ff62c546555518d92cf718bfb590 (diff)
downloadapk-tools-ab7b8e3c995eb5a05ddbaa4546cd16a10da2d836.tar.gz
apk-tools-ab7b8e3c995eb5a05ddbaa4546cd16a10da2d836.tar.bz2
apk-tools-ab7b8e3c995eb5a05ddbaa4546cd16a10da2d836.tar.xz
apk-tools-ab7b8e3c995eb5a05ddbaa4546cd16a10da2d836.zip
db: fix control character check to use uint8_t
fixes #10737
Diffstat (limited to 'src')
-rw-r--r--src/database.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database.c b/src/database.c
index d69bfa0..4b53732 100644
--- a/src/database.c
+++ b/src/database.c
@@ -2406,8 +2406,8 @@ static const char *format_tmpname(struct apk_package *pkg, struct apk_db_file *f
static int contains_control_character(const char *str)
{
- for (; *str; str++) {
- if (*str < 0x20 || *str == 0x7f) return 1;
+ for (const uint8_t *p = (const uint8_t *) str; *p; p++) {
+ if (*p < 0x20 || *p == 0x7f) return 1;
}
return 0;
}