[hackers] [sbase] Add little estrtonum()-range-fix || FRIGN

From: <git_AT_suckless.org>
Date: Mon, 9 Mar 2015 00:41:21 +0100 (CET)

commit 57a4bb29eacae919286ea4274b585627f083837b
Author: FRIGN <dev_AT_frign.de>
Date: Sun Mar 8 21:35:16 2015 +0100

    Add little estrtonum()-range-fix

diff --git a/cal.c b/cal.c
index 4e7dbb8..b630221 100644
--- a/cal.c
+++ b/cal.c
_AT_@ -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;
Received on Mon Mar 09 2015 - 00:41:21 CET

This archive was generated by hypermail 2.3.0 : Mon Mar 09 2015 - 00:48:14 CET