Labels: Type-Defect Priority-Medium
New issue 541 by matt.k...@undue.org: Double decode in
What steps will reproduce the problem?
>>> print google.protobuf.text_format._CUnescape('\\x5c')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
line 691, in _CUnescape
ValueError: Trailing \ in string
What is the expected output? What do you see instead?
The expected output is a single backslash. _CUnescape works if the input
is instead given in octal:
>>> print google.protobuf.text_format._CUnescape('\\134')
When the input is given in hex the escaped backslash is unescaped _twice_,
once in the re.sub() and once in the str.decode().
I'm not using the trunk HEAD but I can see that the issue is still present.
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
You received this message because you are subscribed to the Google Groups "Protocol
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to email@example.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/groups/opt_out.