diff options
author | rofl0r <rofl0r@users.noreply.github.com> | 2020-10-19 20:33:04 +0100 |
---|---|---|
committer | rofl0r <rofl0r@users.noreply.github.com> | 2020-10-19 20:33:04 +0100 |
commit | adad565c03f3ffde6520646bc5d119ce1eadbadb (patch) | |
tree | ae97cf7f5213b942d07d161c0d7e11cfe3a13219 | |
parent | db5c0e99b433ae75c6112e10a384082d35fb5918 (diff) |
http-message: fix UB passing long to format string expecting int
-rw-r--r-- | src/http-message.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |