summaryrefslogtreecommitdiff
path: root/http.c
diff options
context:
space:
mode:
authorihsinme <61293369+ihsinme@users.noreply.github.com>2021-02-05 18:54:30 +0300
committerAzat Khuzhin <azat@libevent.org>2021-02-11 21:14:42 +0300
commitd13b7bbfcf04041f79952c47ae36f2b83e25374a (patch)
tree7415f771a750d025c0fb5c9555f1ffc5b6798578 /http.c
parentbc25889fb3738cdd4d85e3ac162fd6cb2fde9839 (diff)
downloadlibevent-d13b7bbfcf04041f79952c47ae36f2b83e25374a.tar.gz
http: fix invalid unsigned arithmetic
Diffstat (limited to 'http.c')
-rw-r--r--http.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/http.c b/http.c
index 563d211a..9dcb1696 100644
--- a/http.c
+++ b/http.c
@@ -565,7 +565,7 @@ evhttp_maybe_add_date_header(struct evkeyvalq *headers)
{
if (evhttp_find_header(headers, "Date") == NULL) {
char date[50];
- if (sizeof(date) - evutil_date_rfc1123(date, sizeof(date), NULL) > 0) {
+ if ((signed)sizeof(date) > evutil_date_rfc1123(date, sizeof(date), NULL)) {
evhttp_add_header(headers, "Date", date);
}
}