summaryrefslogtreecommitdiffstats
path: root/bin/date/date.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/date/date.c')
-rw-r--r--bin/date/date.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/date/date.c b/bin/date/date.c
index 0ee69b7..95d0bae 100644
--- a/bin/date/date.c
+++ b/bin/date/date.c
@@ -116,7 +116,8 @@ main(argc, argv)
break;
case 'r': /* user specified seconds */
rflag = 1;
- tval = atol(optarg);
+ if (sscanf(optarg,"%li",&tval) != 1)
+ usage();
break;
case 't': /* minutes west of UTC */
/* error check; don't allow "PST" */
OpenPOWER on IntegriCloud