sed: Fix backslash parsing for 'w' command arg
authorBrian Foley <bpfoley@google.com>
Wed, 2 Jan 2019 21:09:45 +0000 (13:09 -0800)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 14 Feb 2019 13:40:57 +0000 (14:40 +0100)
commitb65db51ac1e7a3fe90d1b6dddcb3a860e5574984
treebfe21cdcec5b5c7784d087097bd2c7ff35a0c16c
parentfa86b27e24afa54b8df18f48f55fbbef40b7c6a8
sed: Fix backslash parsing for 'w' command arg

If there's any whitespace between w and the filename, parse_file_cmd
writes to the wrong offset when trying to fix up backslashes.

This can be seen in the asan build with busybox sed -e 'w 0\\'

Signed-off-by: Brian Foley <bpfoley@google.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
editors/sed.c