Segmentation fault in format json with a space before the = 5065 #5080
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.
Spaces around
=
in$(format-json)
template function could cause a crash.The fix of the issue also introduced an enhancement, from now on spaces are allowed around the
=
operator, so the following$(format-json)
template function calls are all valid:Please note the usage of the escaped strings like
\" meggy \"
, and the (escaped and) quoted form that used for an empty value\"\"
, the latter is a breaking change as earlier an expression likekey=
led to a json key-value pair with an empty value{"key":""}
that will not work anymore.Fixes: #5065
Signed-off-by: Hofi hofione@gmail.com