mirror of
https://github.com/linux-pam/linux-pam.git
synced 2024-11-23 17:53:40 +08:00
conf: cast to unsigned char for character handling function
Character handling functions, like isspace(3), expect a value representable as unsigned char or equal to EOF. Otherwise the behavior is undefined. See https://wiki.sei.cmu.edu/confluence/display/c/STR37-C.+Arguments+to+character-handling+functions+must+be+representable+as+an+unsigned+char
This commit is contained in:
parent
dc9427961a
commit
2770046cd8
@ -72,7 +72,7 @@ line
|
|||||||
|
|
||||||
/* make sure we have lower case */
|
/* make sure we have lower case */
|
||||||
for (i=0; $1[i]; ++i) {
|
for (i=0; $1[i]; ++i) {
|
||||||
$1[i] = tolower($1[i]);
|
$1[i] = tolower((unsigned char)$1[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* $1 = service-name */
|
/* $1 = service-name */
|
||||||
|
Loading…
Reference in New Issue
Block a user