]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl: only pass unsigned chars to isspace()
authorWilly Tarreau <w@1wt.eu>
Tue, 25 Feb 2020 06:51:59 +0000 (07:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 25 Feb 2020 06:51:59 +0000 (07:51 +0100)
A build failure on cygwin was reported on github actions here:

  https://github.com/haproxy/haproxy/runs/466507874

It's caused by a signed char being passed to isspace(), and this one
being implemented as a macro instead of a function as the man page
suggests. It's the same issue that regularly pops up on Solaris. This
comes from commit 98263291cc3 which was merged in 1.8-dev1. A backport
is possible though not incredibly useful.

src/ssl_sock.c

index 22985d5b346541b6bbe45497bc31620b95648b78..3943d186b9561396ec4a9d57bc9830726a7ba5ef 100644 (file)
@@ -4591,7 +4591,7 @@ int ssl_sock_load_cert_list_file(char *file, struct bind_conf *bind_conf, struct
                                /* end of string, end of loop */
                                *line = 0;
                                break;
-                       } else if (isspace(*line)) {
+                       } else if (isspace((unsigned char)*line)) {
                                newarg = 1;
                                *line = 0;
                        } else if (*line == '[') {