Date: Thu, 25 Sep 2014 19:22:26 +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: r272127 - head/usr.bin/grep/regex Message-ID: <201409251922.s8PJMQnR048545@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Thu Sep 25 19:22:26 2014 New Revision: 272127 URL: http://svnweb.freebsd.org/changeset/base/272127 Log: bsdgrep: Work-around for segmentation fault. Fix by David Carlier. Obtained from: HardenedBSD PR: 167921 MFC after: 1 month Modified: head/usr.bin/grep/regex/tre-fastmatch.c Modified: head/usr.bin/grep/regex/tre-fastmatch.c ============================================================================== --- head/usr.bin/grep/regex/tre-fastmatch.c Thu Sep 25 19:10:32 2014 (r272126) +++ head/usr.bin/grep/regex/tre-fastmatch.c Thu Sep 25 19:22:26 2014 (r272127) @@ -727,7 +727,7 @@ badpat: for (unsigned int i = 0; i < fg->len; i++) if (fg->pattern[i] == '\\') escaped = !escaped; - else if (fg->pattern[i] == '.' && escaped) + else if (fg->pattern[i] == '.' && fg->escmap && escaped) { fg->escmap[i] = true; escaped = false;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409251922.s8PJMQnR048545>