summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1994-12-13 04:42:23 +0000
committerJim Meyering <jim@meyering.net>1994-12-13 04:42:23 +0000
commit3ae9a27c258733ca18358b6e647fa19227a75730 (patch)
treedfc480176260f09e1015c909a28c0983c6166a3f /src
parent0050411112482f5aac27a314ef0ee926003afeac (diff)
downloadcoreutils-3ae9a27c258733ca18358b6e647fa19227a75730.tar.xz
(docolon): Zero out re_buffer and re_regs before using them.
From H.J. Lu <hjl@nynexst.com>.
Diffstat (limited to 'src')
-rw-r--r--src/expr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/expr.c b/src/expr.c
index a30ffb7a9..a98cc21f4 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -432,6 +432,8 @@ docolon (sv, pv)
tostring (pv);
len = strlen (pv->u.s);
+ bzero (&re_buffer, sizeof (re_buffer));
+ bzero (&re_regs, sizeof (re_regs));
re_buffer.allocated = 2 * len;
re_buffer.buffer = (unsigned char *) xmalloc (re_buffer.allocated);
re_buffer.translate = 0;