From: George Thessalonikefs Date: Thu, 21 May 2020 20:48:57 +0000 (+0200) Subject: - Fix for integer overflow when printing RDF_TYPE_TIME. X-Git-Tag: release-1.11.0~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8af3d73b9bc98a78f1d1758cb23b5ac4b504e611;p=thirdparty%2Funbound.git - Fix for integer overflow when printing RDF_TYPE_TIME. --- diff --git a/doc/Changelog b/doc/Changelog index ec84296f8..75b3822d3 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +21 May 2020: George + - Fix for integer overflow when printing RDF_TYPE_TIME. + 19 May 2020: Wouter - CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. diff --git a/sldns/parseutil.c b/sldns/parseutil.c index 82dbc0fe1..3515d64c5 100644 --- a/sldns/parseutil.c +++ b/sldns/parseutil.c @@ -167,7 +167,7 @@ sldns_gmtime64_r(int64_t clock, struct tm *result) static int64_t sldns_serial_arithmetics_time(int32_t time, time_t now) { - int32_t offset = time - (int32_t) now; + int32_t offset = (int32_t)((uint32_t) time - (uint32_t) now); return (int64_t) now + offset; }