mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-27 01:59:38 -05:00
Do some rough bounds checks on the age
This commit is contained in:
parent
b2bf5094eb
commit
df27731f66
1 changed files with 3 additions and 0 deletions
|
|
@ -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 != ':' ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue