diff options
author | 2020-08-30 12:16:04 +0000 | |
---|---|---|
committer | 2020-08-30 12:16:04 +0000 | |
commit | e33a93b366a4785a5c945b221f3b41942da39c59 (patch) | |
tree | 5ca7e4d45fe6928d9597c70f33f96078eaa14add /lib/libssl/tls12_record_layer.c | |
parent | avoid a invalid pointer deref in hvn_stop() (diff) | |
download | wireguard-openbsd-e33a93b366a4785a5c945b221f3b41942da39c59.tar.xz wireguard-openbsd-e33a93b366a4785a5c945b221f3b41942da39c59.zip |
Fix :S with anchors and replacement
gnezdo noticed that :S/old_string/new_string/ variable modifiers such
as :S/^sth/&/ and :S/sth$/&/ with an anchor in the old_string and an &
in the new_string don't work as documented (and expected) since they
replace & with old_string including the anchors.
This is because get_spatternarg() deals with skipping the anchors in
pattern->lhs only after having replaced any '&' in the buffer that will
eventually become new_string with pattern->lhs. Fix this by moving the
logic of skipping the anchors from get_spatternarg() into
common_get_patternarg() so it is done before & is handled.
ok millert
Diffstat (limited to 'lib/libssl/tls12_record_layer.c')
0 files changed, 0 insertions, 0 deletions