Skip to content

Commit

Permalink
[Security] fix draw security problem (#61161)
Browse files Browse the repository at this point in the history
* fix draw security problem
  • Loading branch information
wanghuancoder committed Jan 25, 2024
1 parent 98c5d5a commit bdf6234
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python/paddle/base/framework.py
Expand Up @@ -5655,8 +5655,7 @@ def draw(self, save_path, name, marked_nodes=None, remove_ctr_var=True):
def _convert_to_pdf(dot_file_path):
pdf_save_path = os.path.splitext(dot_file_path)[0] + '.pdf'
exited_code = subprocess.call(
'dot -Tpdf ' + dot_file_path + ' -o ' + pdf_save_path,
shell=True,
['dot', '-Tpdf', dot_file_path, '-o', pdf_save_path]
)
if exited_code != 0:
print('The dot command is needed for creating pdf files.')
Expand Down

0 comments on commit bdf6234

Please sign in to comment.