From: Howard Chu Date: Fri, 14 Oct 2005 23:29:42 +0000 (+0000) Subject: Do some rough bounds checks on the age X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~248 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=df27731f66963af53fa38bde919bc9e24fbb2914;p=openldap Do some rough bounds checks on the age --- 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 != ':' ) {