Up to [local] / src / usr.bin / sed
Request diff between arbitrary revisions
Default branch: MAIN
Current tag: OPENBSD_5_3_BASE
Revision 1.18 / (download) - annotate - [select for diffs], Sat Sep 17 15:29:19 2011 UTC (12 years, 8 months ago) by schwarze
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE,
OPENBSD_5_4,
OPENBSD_5_3_BASE,
OPENBSD_5_3,
OPENBSD_5_2_BASE,
OPENBSD_5_2,
OPENBSD_5_1_BASE,
OPENBSD_5_1
Changes since 1.17: +44 -49 lines
Diff to previous 1.17 (colored)
Rewrite the main loop of the "sed s/..." command, to fix multiple issues regarding the replacement of zero-length strings. This commit brings back rev. 1.16, but without the regression that forced the backout: No NUL bytes will be output now, not even when the input file lacks a trailing newline character and there is a zero-length match at the end. OK otto@ deraadt@; and naddy@ (who originally found the regression) checked that the regression is indeed fixed.