Skip to content

Commit d13b7bb

Browse files
ihsinmeazat
authored andcommitted
http: fix invalid unsigned arithmetic
1 parent bc25889 commit d13b7bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

http.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ evhttp_maybe_add_date_header(struct evkeyvalq *headers)
565565
{
566566
if (evhttp_find_header(headers, "Date") == NULL) {
567567
char date[50];
568-
if (sizeof(date) - evutil_date_rfc1123(date, sizeof(date), NULL) > 0) {
568+
if ((signed)sizeof(date) > evutil_date_rfc1123(date, sizeof(date), NULL)) {
569569
evhttp_add_header(headers, "Date", date);
570570
}
571571
}

0 commit comments

Comments
 (0)