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>
Mon, 21 Jan 2019 12:22:31 +0000 (13:22 +0100)
commitb7928e18b14a2bc2aa27f82b80803fdff68c328a
tree85bb9458e9e48a09089bf4470e988e3ac2dad3d2
parent1c42c18e9601ee1416d61663f5a91874954c524d
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