]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl_ckch: use my_strndup() instead of strndup()
authorWilly Tarreau <w@1wt.eu>
Wed, 2 Apr 2025 15:18:23 +0000 (17:18 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 2 Apr 2025 15:20:03 +0000 (17:20 +0200)
Not all systems have strndup(), that's why we have our "my_strndup()",
so let's make use of it here. This fixes the build on Solaris 10.
No backport is needed, this was just merged with commit fdcb97614c
("MINOR: ssl/ckch: add substring parser for ckch_conf").

src/ssl_ckch.c

index f26fdbbf13db34f74562c23cf72c12b9c277135a..c6f92f805260695174912c1d1a5cc327a7843081 100644 (file)
@@ -4819,7 +4819,7 @@ int ckch_conf_parse(char **args, int cur_arg, struct ckch_conf *f, int *found, c
                                                err_code |= ERR_ALERT | ERR_ABORT;
                                                goto array_err;
                                        }
-                                       r[n] = strndup(b, e - b);
+                                       r[n] = my_strndup(b, e - b);
                                        if (!r[n]) {
                                                ha_alert("parsing [%s:%d]: out of memory.\n", file, linenum);
                                                err_code |= ERR_ALERT | ERR_ABORT;