Fix incorrect escaping of quotes for CMD when quoting #998
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relates to #986
Summary
Update escaping for quoting for CMD following a fuzz crash found during nightly fuzzing. The crash detected incorrect results for certain uses of double quotes. This has lead to a significant change to the implementation of escaping for quoting for CMD. In particular, double quotes will now be escaped as
\\"
(correspondingly, backslashes will be escaped as\\\\
) based on the rules laid out in (of all sources) thisgawk
documentation. As a consequence, escaping of special characters is now only done when there's an even number of quotes preceding that character (don't ask me why...).Notes
bug
label isn't applied because this doesn't fix a released problem.