diff options
author | pfg <pfg@FreeBSD.org> | 2015-02-20 21:21:38 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2015-02-20 21:21:38 +0000 |
commit | 6fa37b884913b9fb17567a2c595b7d9d228db9d1 (patch) | |
tree | f4be84572681c9d407b4b56edcdd5f8a50238162 /lib/libc/regex | |
parent | 06baf2f090b607bd986c967b61b0db0fadd886ea (diff) | |
download | FreeBSD-src-6fa37b884913b9fb17567a2c595b7d9d228db9d1.zip FreeBSD-src-6fa37b884913b9fb17567a2c595b7d9d228db9d1.tar.gz |
regex(3): Fix uninitialized pointer values.
CID: 405582 (also clang static checker)
CID: 1018724
Diffstat (limited to 'lib/libc/regex')
-rw-r--r-- | lib/libc/regex/engine.c | 2 | ||||
-rw-r--r-- | lib/libc/regex/regcomp.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c index 589bb9d..8fc67ce 100644 --- a/lib/libc/regex/engine.c +++ b/lib/libc/regex/engine.c @@ -157,7 +157,7 @@ matcher(struct re_guts *g, int i; struct match mv; struct match *m = &mv; - const char *dp; + const char *dp = NULL; const sopno gf = g->firststate+1; /* +1 for OEND */ const sopno gl = g->laststate; const char *start; diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index ae92f6a..2da5066 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -1422,8 +1422,8 @@ static void findmust(struct parse *p, struct re_guts *g) { sop *scan; - sop *start; - sop *newstart; + sop *start = NULL; + sop *newstart = NULL; sopno newlen; sop s; char *cp; |