From: William Lallemand Date: Wed, 18 Dec 2024 10:25:22 +0000 (+0100) Subject: BUILD: ssl/ocsp: error: ā€˜%.*s’ directive argument is null X-Git-Tag: v3.2-dev2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e11d349407e12919480abb7894cfc913e60eb1b;p=thirdparty%2Fhaproxy.git BUILD: ssl/ocsp: error: ā€˜%.*s’ directive argument is null Some gcc version will emit an error because a '%.*s' argument have a NULL parameter. Initialize the string to "" instead. --- diff --git a/src/ssl_ocsp.c b/src/ssl_ocsp.c index 741911074f..b4c3122e90 100644 --- a/src/ssl_ocsp.c +++ b/src/ssl_ocsp.c @@ -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();