aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-10-18 12:16:53 +0200
committerArnold D. Robbins <arnold@skeeve.com>2011-10-18 12:16:53 +0200
commit4a9f65ea0a861f842fa05120f9da0365019c2892 (patch)
treeb48626f1a3b36838cd3356bda0ffad3cf2013f91 /builtin.c
parent0cf50ae4c064bd2d8960ffd1e14f97402b8f5157 (diff)
downloadegawk-4a9f65ea0a861f842fa05120f9da0365019c2892.tar.gz
egawk-4a9f65ea0a861f842fa05120f9da0365019c2892.tar.bz2
egawk-4a9f65ea0a861f842fa05120f9da0365019c2892.zip
Fix stftime.
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin.c b/builtin.c
index 072fd8ff..bae02f4d 100644
--- a/builtin.c
+++ b/builtin.c
@@ -1673,6 +1673,8 @@ do_strftime(int nargs)
if (do_lint && (t2->flags & (NUMCUR|NUMBER)) == 0)
lintwarn(_("strftime: received non-numeric second argument"));
fclock = (time_t) force_number(t2);
+ if (fclock < 0)
+ fatal(_("strftime: second argument less than 0 or too big for time_t"));
DEREF(t2);
}