Date: Fri, 20 Feb 2015 21:21:39 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279090 - head/lib/libc/regex Message-ID: <201502202121.t1KLLd5e097574@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Fri Feb 20 21:21:38 2015 New Revision: 279090 URL: https://svnweb.freebsd.org/changeset/base/279090 Log: regex(3): Fix uninitialized pointer values. CID: 405582 (also clang static checker) CID: 1018724 Modified: head/lib/libc/regex/engine.c head/lib/libc/regex/regcomp.c Modified: head/lib/libc/regex/engine.c ============================================================================== --- head/lib/libc/regex/engine.c Fri Feb 20 20:49:00 2015 (r279089) +++ head/lib/libc/regex/engine.c Fri Feb 20 21:21:38 2015 (r279090) @@ -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; Modified: head/lib/libc/regex/regcomp.c ============================================================================== --- head/lib/libc/regex/regcomp.c Fri Feb 20 20:49:00 2015 (r279089) +++ head/lib/libc/regex/regcomp.c Fri Feb 20 21:21:38 2015 (r279090) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502202121.t1KLLd5e097574>