summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-01-15 11:10:14 +0200
committerTimo Teras <timo.teras@iki.fi>2009-01-15 11:10:14 +0200
commit4c7f1e0deca0a48bd398d332e3a3c42ce527d04a (patch)
treeb7b912027c49d60487828e1bc40acd58c2232098 /src
parent2cfde12c8933c166feda81e52d6c091d2c7c5748 (diff)
downloadapk-tools-4c7f1e0deca0a48bd398d332e3a3c42ce527d04a.tar.gz
apk-tools-4c7f1e0deca0a48bd398d332e3a3c42ce527d04a.tar.bz2
apk-tools-4c7f1e0deca0a48bd398d332e3a3c42ce527d04a.tar.xz
apk-tools-4c7f1e0deca0a48bd398d332e3a3c42ce527d04a.zip
apk: isalnum() takes only unsigned char values add explicit check for that
Diffstat (limited to 'src')
-rw-r--r--src/apk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/apk.c b/src/apk.c
index 4062e56..2a8c959 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -126,7 +126,8 @@ int main(int argc, char **argv)
}
for (opt = &generic_options[0], sopt = short_options;
opt->name != NULL; opt++) {
- if (opt->flag == NULL && isalnum(opt->val)) {
+ if (opt->flag == NULL &&
+ opt->val <= 0xff && isalnum(opt->val)) {
*(sopt++) = opt->val;
if (opt->has_arg != no_argument)
*(sopt++) = ':';