diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2015-09-11 11:41:27 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2015-09-11 11:41:27 +0000 |
commit | 8431ac8e5f4c885a5b0fa611dec1ef657114758b (patch) | |
tree | 80c4971e135b0982c95b8b92de4dd6f1e6d25bc7 | |
parent | 1ea0243c4c85bf02e910643905cda268b9be7d55 (diff) |
Avoid undefined behavior with isascii, cast its argument to unsigned char.
Suggested earlier by guenther@, discussed with miod@
-rw-r--r-- | gnu/usr.sbin/mkhybrid/src/name.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.sbin/mkhybrid/src/name.c b/gnu/usr.sbin/mkhybrid/src/name.c index 4993fda6f62..88c3262a527 100644 --- a/gnu/usr.sbin/mkhybrid/src/name.c +++ b/gnu/usr.sbin/mkhybrid/src/name.c @@ -211,7 +211,7 @@ int FDECL3(iso9660_file_length, } if(current_length < 30) { - if(!isascii(*pnt)) + if(!isascii((unsigned char)*pnt)) { *result++ = '_'; } @@ -279,7 +279,7 @@ int FDECL3(iso9660_file_length, switch (*pnt) { default: - if(!isascii(*pnt)) + if(!isascii((unsigned char)*pnt)) { *result++ = '_'; } |