aboutsummaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2023-08-07 12:46:15 +0200
committerDmitry V. Levin <ldv@strace.io>2023-08-07 10:46:40 +0000
commit2770046cd8c24eae69625f7cbab0b6995008bbf7 (patch)
treea4bac8e74c32cdae23a1ef139c1fd71915ee9d03 /conf
parentdc9427961a7186b065d59041f59f2f6c4a991998 (diff)
downloadpam-2770046cd8c24eae69625f7cbab0b6995008bbf7.tar.gz
pam-2770046cd8c24eae69625f7cbab0b6995008bbf7.tar.bz2
pam-2770046cd8c24eae69625f7cbab0b6995008bbf7.zip
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
Diffstat (limited to 'conf')
-rw-r--r--conf/pam_conv1/pam_conv_y.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/conf/pam_conv1/pam_conv_y.y b/conf/pam_conv1/pam_conv_y.y
index 66d80440..67409103 100644
--- a/conf/pam_conv1/pam_conv_y.y
+++ b/conf/pam_conv1/pam_conv_y.y
@@ -72,7 +72,7 @@ line
/* make sure we have lower case */
for (i=0; $1[i]; ++i) {
- $1[i] = tolower($1[i]);
+ $1[i] = tolower((unsigned char)$1[i]);
}
/* $1 = service-name */