From adad565c03f3ffde6520646bc5d119ce1eadbadb Mon Sep 17 00:00:00 2001 From: rofl0r Date: Mon, 19 Oct 2020 20:33:04 +0100 Subject: http-message: fix UB passing long to format string expecting int --- src/http-message.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http-message.c b/src/http-message.c index 96a6994..4ff37ae 100644 --- a/src/http-message.c +++ b/src/http-message.c @@ -259,7 +259,7 @@ int http_message_send (http_message_t msg, int fd) write_message (fd, "Date: %s\r\n", timebuf); /* Output the content-length */ - write_message (fd, "Content-length: %u\r\n", msg->body.length); + write_message (fd, "Content-length: %lu\r\n", (unsigned long) msg->body.length); /* Write the separator between the headers and body */ safe_write (fd, "\r\n", 2); -- cgit v1.2.3