diff options
author | Daniel Stenberg <daniel@haxx.se> | 2023-01-02 12:53:45 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-01-02 13:24:37 +0100 |
commit | b637f353463887e980f6adad8305ca9a07dab21d (patch) | |
tree | 087a4a64ed7794cc97fead6689b4c43509272f91 /lib/http2.c | |
parent | 42c3b23a7c66e19123e845f025c37c366fdb109b (diff) | |
download | curl-b637f353463887e980f6adad8305ca9a07dab21d.tar.gz |
http2: when using printf %.*s, the length arg must be 'int'
Detected by Coverity CID 1518341
Closes #10203
Diffstat (limited to 'lib/http2.c')
-rw-r--r-- | lib/http2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/http2.c b/lib/http2.c index 95ffb0996..d170adf84 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -1155,11 +1155,11 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame, if(stream->bodystarted) { /* This is a trailer */ - H2BUGF(infof(data_s, "h2 trailer: %.*s: %.*s", namelen, name, valuelen, - value)); + H2BUGF(infof(data_s, "h2 trailer: %.*s: %.*s", (int)namelen, name, + (int)valuelen, value)); result = Curl_dyn_addf(&stream->trailer_recvbuf, - "%.*s: %.*s\r\n", namelen, name, - valuelen, value); + "%.*s: %.*s\r\n", (int)namelen, name, + (int)valuelen, value); if(result) return NGHTTP2_ERR_CALLBACK_FAILURE; @@ -1217,8 +1217,8 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame, if(get_transfer(ctx) != data_s) Curl_expire(data_s, 0, EXPIRE_RUN_NOW); - H2BUGF(infof(data_s, "h2 header: %.*s: %.*s", namelen, name, valuelen, - value)); + H2BUGF(infof(data_s, "h2 header: %.*s: %.*s", (int)namelen, name, + (int)valuelen, value)); return 0; /* 0 is successful */ } |