]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: ssl/ocsp: error: ā€˜%.*s’ directive argument is null
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 18 Dec 2024 10:25:22 +0000 (11:25 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 18 Dec 2024 10:25:22 +0000 (11:25 +0100)
Some gcc version will emit an error because a '%.*s' argument have a
NULL parameter. Initialize the string to "" instead.

src/ssl_ocsp.c

index 741911074f1a949bc88232b23fe27781a8c4e9c8..b4c3122e90d5c0c7d6f4fc4f5aa98c3cf4e033d6 100644 (file)
@@ -1098,7 +1098,7 @@ void ocsp_update_response_end_cb(struct httpclient *hc)
 static void ssl_ocsp_send_log()
 {
        int status_str_len = 0;
-       char *status_str = NULL;
+       char *status_str = "";
        struct certificate_ocsp *ocsp = ssl_ocsp_task_ctx.cur_ocsp;
        char *last_error = NULL;
        struct buffer *tmpbuf = get_trash_chunk();