From 8af3d73b9bc98a78f1d1758cb23b5ac4b504e611 Mon Sep 17 00:00:00 2001 From: George Thessalonikefs Date: Thu, 21 May 2020 22:48:57 +0200 Subject: [PATCH] - Fix for integer overflow when printing RDF_TYPE_TIME. --- doc/Changelog | 3 +++ sldns/parseutil.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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; } -- 2.47.3