pyyaml
pyyaml copied to clipboard
BUG: ValueError: chr() arg not in range(0x110000)
➜ pyyaml git:(master) ✗ cat load.py
import sys
import yaml
from pprint import PrettyPrinter
pp = PrettyPrinter(indent=4)
with open(sys.argv[1], "r") as f:
yaml_file = yaml.load(f, Loader=yaml.FullLoader)
pp.pprint(yaml_file)
➜ pyyaml git:(master) ✗ cat crash-96970bc3d254d3a8f6b06faf78c3337abf4a3bdd
"\U55555555555555555555555555555555555555550"\U6#
➜ pyyaml git:(master) ✗ cat crash-96970bc3d254d3a8f6b06faf78c3337abf4a3bdd| base64
IlxVNTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTU1NTAiXFU2
➜ pyyaml git:(master) ✗ python3 load.py crash-96970bc3d254d3a8f6b06faf78c3337abf4a3bdd
Traceback (most recent call last):
File "load.py", line 7, in <module>
yaml_file = yaml.load(f, Loader=yaml.FullLoader)
File "/usr/lib/python3/dist-packages/yaml/__init__.py", line 114, in load
return loader.get_single_data()
File "/usr/lib/python3/dist-packages/yaml/constructor.py", line 49, in get_single_data
node = self.get_single_node()
File "/usr/lib/python3/dist-packages/yaml/composer.py", line 35, in get_single_node
if not self.check_event(StreamEndEvent):
File "/usr/lib/python3/dist-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/lib/python3/dist-packages/yaml/parser.py", line 142, in parse_implicit_document_start
if not self.check_token(DirectiveToken, DocumentStartToken,
File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 116, in check_token
self.fetch_more_tokens()
File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 251, in fetch_more_tokens
return self.fetch_double()
File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 655, in fetch_double
self.fetch_flow_scalar(style='"')
File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 666, in fetch_flow_scalar
self.tokens.append(self.scan_flow_scalar(style))
File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 1149, in scan_flow_scalar
chunks.extend(self.scan_flow_scalar_non_spaces(double, start_mark))
File "/usr/lib/python3/dist-packages/yaml/scanner.py", line 1217, in scan_flow_scalar_non_spaces
chunks.append(chr(code))
ValueError: chr() arg not in range(0x110000)