diff options
author | Renato Botelho <renato@netgate.com> | 2016-06-06 08:05:51 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-06-06 08:05:51 -0300 |
commit | 47dfb8d658406ebf07225c0104ebe4be06ae405f (patch) | |
tree | 83174cbd9592560c48ad2cd11afe42c5c12b6c1b /lib/libc/regex/engine.c | |
parent | 131cd15b13bbd3e141e911a65cf7a1895ec6ab05 (diff) | |
parent | 13d657a35d96e65f1be391830f36e1adff33534f (diff) | |
download | FreeBSD-src-47dfb8d658406ebf07225c0104ebe4be06ae405f.zip FreeBSD-src-47dfb8d658406ebf07225c0104ebe4be06ae405f.tar.gz |
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'lib/libc/regex/engine.c')
-rw-r--r-- | lib/libc/regex/engine.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/libc/regex/engine.c b/lib/libc/regex/engine.c index 72922f6..2ca971b 100644 --- a/lib/libc/regex/engine.c +++ b/lib/libc/regex/engine.c @@ -606,9 +606,9 @@ backref(struct match *m, return(NULL); break; case OBOL: - if ( (sp == m->beginp && !(m->eflags®_NOTBOL)) || - (sp < m->endp && *(sp-1) == '\n' && - (m->g->cflags®_NEWLINE)) ) + if ((sp == m->beginp && !(m->eflags®_NOTBOL)) || + (sp > m->offp && sp < m->endp && + *(sp-1) == '\n' && (m->g->cflags®_NEWLINE))) { /* yes */ } else return(NULL); @@ -622,12 +622,9 @@ backref(struct match *m, return(NULL); break; case OBOW: - if (( (sp == m->beginp && !(m->eflags®_NOTBOL)) || - (sp < m->endp && *(sp-1) == '\n' && - (m->g->cflags®_NEWLINE)) || - (sp > m->beginp && - !ISWORD(*(sp-1))) ) && - (sp < m->endp && ISWORD(*sp)) ) + if (sp < m->endp && ISWORD(*sp) && + ((sp == m->beginp && !(m->eflags®_NOTBOL)) || + (sp > m->offp && !ISWORD(*(sp-1))))) { /* yes */ } else return(NULL); |