From df27731f66963af53fa38bde919bc9e24fbb2914 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Fri, 14 Oct 2005 23:29:42 +0000 Subject: [PATCH] Do some rough bounds checks on the age --- servers/slapd/overlays/accesslog.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/servers/slapd/overlays/accesslog.c b/servers/slapd/overlays/accesslog.c index 4ad8f9e042..b3d78b1ef4 100644 --- a/servers/slapd/overlays/accesslog.c +++ b/servers/slapd/overlays/accesslog.c @@ -360,6 +360,9 @@ log_age_parse(char *agestr) t1 = strtol( agestr, &endptr, 10 ); /* Is there a days delimiter? */ if ( *endptr == '+' ) { + /* 32 bit time only covers about 68 years */ + if ( t1 < 0 || t1 > 25000 ) + return -1; t1 *= 24; gotdays = 1; } else if ( *endptr != ':' ) { -- 2.39.5