Date: Thu, 16 Aug 2018 18:35: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: r337920 - head/usr.bin/sed Message-ID: <201808161835.w7GIZdKa044794@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Thu Aug 16 18:35:39 2018 New Revision: 337920 URL: https://svnweb.freebsd.org/changeset/base/337920 Log: Revert r337419. The fix is only partial and causes an asymmetry which breaks a test in multi_test.sh. We should consider both parts of the issue found in OpenBSD[1], but for now just revert the change. [1] http://undeadly.org/cgi?action=article;sid=20180728110010 Reported by: asomers Modified: head/usr.bin/sed/compile.c Modified: head/usr.bin/sed/compile.c ============================================================================== --- head/usr.bin/sed/compile.c Thu Aug 16 18:30:49 2018 (r337919) +++ head/usr.bin/sed/compile.c Thu Aug 16 18:35:39 2018 (r337920) @@ -393,11 +393,11 @@ compile_delimited(char *p, char *d, int is_tr) if ((d = compile_ccl(&p, d)) == NULL) errx(1, "%lu: %s: unbalanced brackets ([])", linenum, fname); continue; - } else if (*p == '\\' && p[1] == c) { - p++; } else if (*p == '\\' && p[1] == '[') { *d++ = *p++; - } else if (*p == '\\' && p[1] == 'n') { + } else if (*p == '\\' && p[1] == c) + p++; + else if (*p == '\\' && p[1] == 'n') { *d++ = '\n'; p += 2; continue;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808161835.w7GIZdKa044794>