utils: xyaml: Do not use deprecated function

From the official PyYAML documentation:

"Warning: It is not safe to call yaml.load with any data received from an
untrusted source! yaml.load is as powerful as pickle.load and so may call
any Python function. Check the yaml.safe_load function though."

Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
This commit is contained in:
Daniel Schultz 2021-01-05 23:36:24 +01:00
parent d3fba0c6a0
commit ec15a221d6
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ def load(f):
data = data.decode('utf-8')
# Strip out of !<tags>
data = re.sub("!<[^>]*>", "", data)
return yaml.load(io.StringIO(data))
return yaml.safe_load(io.StringIO(data))
def tojson(f):