diff options
author | Willy Tarreau <w@1wt.eu> | 2020-08-29 06:44:37 +0200 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2020-08-29 06:44:37 +0200 |
commit | 1c34b881c3ed452236822aa458aa0055538a84fa (patch) | |
tree | 6ca66a9c9144ac826acbe4436f8c642eda42d867 | |
parent | 9dbb6c43ce655e018da2c7f78a6cfb7f42d95c1c (diff) | |
download | haproxy-1c34b881c3ed452236822aa458aa0055538a84fa.tar.gz |
BUILD: sock_unix: fix build issue with isdigit()
Commit 0d06df6 ("MINOR: sock: introduce sock_inet and sock_unix")
made use of isdigit() on the UNIX socket path without casting the
value to unsigned char, breaking the build on cygwin and possibly
other platforms. No backport is needed.
-rw-r--r-- | src/sock_unix.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sock_unix.c b/src/sock_unix.c index c4314d2e7..f68c0073a 100644 --- a/src/sock_unix.c +++ b/src/sock_unix.c @@ -80,7 +80,7 @@ int sock_unix_addrcmp(const struct sockaddr_storage *a, const struct sockaddr_st /* First, check in path "a" */ if (au->sun_path[idx] != 0) { - for (idx2 = dot + 1; idx2 && isdigit(au->sun_path[idx2]);) + for (idx2 = dot + 1; idx2 && isdigit((unsigned char)au->sun_path[idx2]);) idx2++; if (strcmp(au->sun_path + idx2, ".tmp") != 0) return -1; @@ -88,7 +88,7 @@ int sock_unix_addrcmp(const struct sockaddr_storage *a, const struct sockaddr_st /* Then check in path "b" */ if (bu->sun_path[idx] != 0) { - for (idx2 = dot + 1; idx2 && isdigit(bu->sun_path[idx2]); idx2++) + for (idx2 = dot + 1; idx2 && isdigit((unsigned char)bu->sun_path[idx2]); idx2++) ; if (strcmp(bu->sun_path + idx2, ".tmp") != 0) return -1; |