Add little estrtonum()-range-fix
This commit is contained in:
parent
76ad86b2a3
commit
8ffa06b3dc
2
cal.c
2
cal.c
|
@ -171,7 +171,7 @@ main(int argc, char *argv[])
|
||||||
fday = 1;
|
fday = 1;
|
||||||
break;
|
break;
|
||||||
case 'n':
|
case 'n':
|
||||||
nmons = estrtonum(EARGF(usage()), 1, INT_MAX);
|
nmons = estrtonum(EARGF(usage()), 1, MIN(SIZE_MAX, LLONG_MAX));
|
||||||
break;
|
break;
|
||||||
case 's': /* Sunday */
|
case 's': /* Sunday */
|
||||||
fday = 0;
|
fday = 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user