aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2011-10-25 22:08:53 +0200
committerArnold D. Robbins <arnold@skeeve.com>2011-10-25 22:08:53 +0200
commit44cd8b0b374419f77febc504b0053b87c894810c (patch)
treee0016bafbc35ee5df461aed0cc09640ad9d0257c /builtin.c
parenta2f4c46ba3d4cd3de6be372316abc0e0e6518d4c (diff)
parenta3d40d091d31ec54b85240209afddb0212de085c (diff)
downloadegawk-44cd8b0b374419f77febc504b0053b87c894810c.tar.gz
egawk-44cd8b0b374419f77febc504b0053b87c894810c.tar.bz2
egawk-44cd8b0b374419f77febc504b0053b87c894810c.zip
Merge branch 'gawk-4.0-stable'
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/builtin.c b/builtin.c
index bf688581..1fb107db 100644
--- a/builtin.c
+++ b/builtin.c
@@ -32,6 +32,10 @@
#include "random.h"
#include "floatmagic.h"
+#if defined(HAVE_POPEN_H)
+#include "popen.h"
+#endif
+
#ifndef CHAR_BIT
# define CHAR_BIT 8
#endif
@@ -1677,6 +1681,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 (((long int) fclock) < 0)
+ fatal(_("strftime: second argument less than 0 or too big for time_t"));
DEREF(t2);
}
@@ -2423,7 +2429,7 @@ do_sub(int nargs, unsigned int flags)
size_t len;
char *matchstart;
char *text;
- size_t textlen;
+ size_t textlen = 0;
char *repl;
char *replend;
size_t repllen;