diff options
author | 2017-04-03 16:18:35 +0000 | |
---|---|---|
committer | 2017-04-03 16:18:35 +0000 | |
commit | 25f2b9c34f10ac6ee2043fc8bf60fffc6961c11d (patch) | |
tree | b3ef616631c9da2f8127e085b4c3d06ae528586b /usr.bin/grep | |
parent | provide size to free(9) (diff) | |
download | wireguard-openbsd-25f2b9c34f10ac6ee2043fc8bf60fffc6961c11d.tar.xz wireguard-openbsd-25f2b9c34f10ac6ee2043fc8bf60fffc6961c11d.zip |
initialize regmatch_t always, fixes grep -o ""
from Michael Santos
Diffstat (limited to 'usr.bin/grep')
-rw-r--r-- | usr.bin/grep/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c index 1093b09af94..9cfed4c0dae 100644 --- a/usr.bin/grep/util.c +++ b/usr.bin/grep/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.56 2016/08/25 15:11:05 tedu Exp $ */ +/* $OpenBSD: util.c,v 1.57 2017/04/03 16:18:35 tedu Exp $ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -171,7 +171,7 @@ procfile(char *fn) static int procline(str_t *l, int nottext) { - regmatch_t pmatch; + regmatch_t pmatch = { 0 }; int c, i, r; regoff_t offset; |