From 2770046cd8c24eae69625f7cbab0b6995008bbf7 Mon Sep 17 00:00:00 2001 From: Christian Göttsche Date: Mon, 7 Aug 2023 12:46:15 +0200 Subject: 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 --- conf/pam_conv1/pam_conv_y.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'conf') 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 */ -- cgit v1.2.3