Skip to content

[libc][newheadergen]: yaml.load instead of safe_load #100024

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions libc/newhdrgen/yaml_to_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def load_yaml_file(yaml_file, header_class, entry_points):
HeaderFile: An instance of HeaderFile populated with the data.
"""
with open(yaml_file, "r") as f:
yaml_data = yaml.safe_load(f)
yaml_data = yaml.load(f, Loader=yaml.FullLoader)
return yaml_to_classes(yaml_data, header_class, entry_points)


Expand Down Expand Up @@ -173,8 +173,7 @@ def add_function_to_yaml(yaml_file, function_details):
new_function = parse_function_details(function_details)

with open(yaml_file, "r") as f:
yaml_data = yaml.safe_load(f)

yaml_data = yaml.load(f, Loader=yaml.FullLoader)
if "functions" not in yaml_data:
yaml_data["functions"] = []

Expand Down
Loading