]> git.ipfire.org Git - thirdparty/curl.git/commit
tool: avoid generating ambiguous escaped characters in --libcurl
authorPatrick Monnerat <patrick@monnerat.net>
Tue, 4 Oct 2022 14:50:45 +0000 (16:50 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 5 Oct 2022 14:09:46 +0000 (16:09 +0200)
commit172259c4de33036e231748205eaa61087d1b9de4
tree04997377419a3f6c8e2d62e2e6ec4f32919b19eb
parent3664bccc54c2026d4d1fb7d99fa1a7b83ca9ae9b
tool: avoid generating ambiguous escaped characters in --libcurl

C string hexadecimal-escaped characters may have more than 2 digits.
This results in a wrong C compiler interpretation of a 2-digit escaped
character when followed by an hex digit character.

The solution retained here is to represent such characters as 3-digit
octal escapes.

Adjust and extend test 1465 for this case.

Closes #9643
src/tool_setopt.c
tests/data/test1465