aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2019-02-28 17:31:00 +0100
committerLeah Neukirchen <leah@vuxu.org>2019-02-28 17:34:58 +0100
commit74d8393fdf3995fb6181f5005ead69a656836c92 (patch)
tree106e16886b7228a4060ff3e564cc250b8d1880e6
parent11ae5504fdb230478cb259f8d600f824e81e8590 (diff)
downloadmblaze-74d8393fdf3995fb6181f5005ead69a656836c92.tar.gz
msed: fix use of uninitialized memory
found by -fsanitize=memory
-rw-r--r--msed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/msed.c b/msed.c
index bc1f121..3bcad9a 100644
--- a/msed.c
+++ b/msed.c
@@ -28,7 +28,7 @@ subst(char *str, char *srch, char *repl, char *flags)
#define APPC(c) do { if (b >= bufe) return str; *b++ = c; } while (0)
regex_t srchrx;
- regmatch_t pmatch[10];
+ regmatch_t pmatch[10] = {0};
if (regcomp(&srchrx, srch, iflag ? REG_ICASE : 0) != 0)
return str;