diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-10-12 01:05:25 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-10-12 01:05:25 +0000 |
commit | 59639f3de7b1dbf1513c4d65153f64792f850497 (patch) | |
tree | 5fa0a4fe6a295d00bd61ff080675d8e584a53973 /regex | |
parent | 6636616ae9385f7e41ccd420aa1cf78bba282d4a (diff) | |
download | php-git-59639f3de7b1dbf1513c4d65153f64792f850497.tar.gz |
MFB: Fixed potential use of un-initialized var
Diffstat (limited to 'regex')
-rw-r--r-- | regex/regcomp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/regex/regcomp.c b/regex/regcomp.c index ec034d4c4c..d72cc82940 100644 --- a/regex/regcomp.c +++ b/regex/regcomp.c @@ -1553,6 +1553,11 @@ register struct re_guts *g; if (g->mlen == 0) /* there isn't one */ return; + if (!start) { + g->mlen = 0; + return; + } + /* turn it into a character string */ g->must = malloc((size_t)g->mlen + 1); if (g->must == NULL) { /* argh; just forget it */ |