From 6bae276ecbd75402fc0644057cb0e522fdf0cc80 Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Fri, 15 Dec 2017 10:16:06 +0000 Subject: [PATCH] this version of unbound fails when compiled with CC=clang and -O (edit Makefile), or -O2 (default). If you use no optimizing flag, unittest works. git-svn-id: file:///svn/unbound/trunk@4425 be551aaa-1e26-0410-a405-d3ace91eadb9 --- validator/val_sigcrypt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/validator/val_sigcrypt.c b/validator/val_sigcrypt.c index 099e658a3..dc946c96b 100644 --- a/validator/val_sigcrypt.c +++ b/validator/val_sigcrypt.c @@ -1211,6 +1211,7 @@ check_dates(struct val_env* ve, uint32_t unow, { /* read out the dates */ int32_t expi, incep, now; + int32_t incepminexpi; memmove(&expi, expi_p, sizeof(expi)); memmove(&incep, incep_p, sizeof(incep)); expi = ntohl(expi); @@ -1227,7 +1228,9 @@ check_dates(struct val_env* ve, uint32_t unow, } else now = (int32_t)unow; /* check them */ - if(incep - expi > 0) { + incepminexpi = incep-expi; + if(incepminexpi > 0) { + log_info("incep-expi failure"); sigdate_error("verify: inception after expiration, " "signature bad", expi, incep, now); *reason = "signature inception after expiration"; -- 2.47.3