commit 8ffa06b3dcab3a147fab85bd28d8b84413c33ce3
parent 76ad86b2a3164629c686596f1b645584b003daa9
Author: FRIGN <dev@frign.de>
Date: Sun, 8 Mar 2015 21:35:16 +0100
Add little estrtonum()-range-fix
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cal.c b/cal.c
@@ -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;