Skip to content

Commit

Permalink
Fix argument range of ctype functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsonn committed Jun 21, 2016
1 parent 3bf4a20 commit 433a84d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libarchive_fe/passphrase.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@ readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags)
if (p < end) {
if ((flags & RPP_SEVENBIT))
ch &= 0x7f;
if (isalpha(ch)) {
if (isalpha((unsigned char)ch)) {
if ((flags & RPP_FORCELOWER))
ch = (char)tolower(ch);
ch = (char)tolower((unsigned char)ch);
if ((flags & RPP_FORCEUPPER))
ch = (char)toupper(ch);
ch = (char)toupper((unsigned char)ch);
}
*p++ = ch;
}
Expand Down

0 comments on commit 433a84d

Please sign in to comment.