Add little estrtonum()-range-fix

This commit is contained in:
FRIGN 2015-03-08 21:35:16 +01:00
parent 76ad86b2a3
commit 8ffa06b3dc

2
cal.c
View File

@ -171,7 +171,7 @@ main(int argc, char *argv[])
fday = 1;
break;
case 'n':
nmons = estrtonum(EARGF(usage()), 1, INT_MAX);
nmons = estrtonum(EARGF(usage()), 1, MIN(SIZE_MAX, LLONG_MAX));
break;
case 's': /* Sunday */
fday = 0;