summaryrefslogtreecommitdiff
path: root/src/certtool-cfg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/certtool-cfg.c')
-rw-r--r--src/certtool-cfg.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/certtool-cfg.c b/src/certtool-cfg.c
index e212fc476c..332b8b2e96 100644
--- a/src/certtool-cfg.c
+++ b/src/certtool-cfg.c
@@ -1198,7 +1198,7 @@ time_t now = time(NULL);
if (secs != (time_t)-1) {
if (INT_MULTIPLY_OVERFLOW(secs, 24*60*60)) {
- secs = -1;
+ goto overflow;
} else {
secs *= 24*60*60;
}
@@ -1206,13 +1206,16 @@ time_t now = time(NULL);
if (secs != (time_t)-1) {
if (INT_ADD_OVERFLOW(secs, now)) {
- secs = -1;
+ goto overflow;
} else {
secs += now;
}
}
return secs;
+ overflow:
+ fprintf(stderr, "Overflow while parsing days\n");
+ exit(1);
}
static