From 9cd0c91934a313352eeb84dd3ee52df7821237a4 Mon Sep 17 00:00:00 2001 From: wanghuancoder Date: Thu, 1 Feb 2024 14:13:31 +0800 Subject: [PATCH] [Security] fix security problem for run_cmd (#61285) (#61398) * fix security problem for run_cmd --- python/paddle/utils/cpp_extension/extension_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/paddle/utils/cpp_extension/extension_utils.py b/python/paddle/utils/cpp_extension/extension_utils.py index e64f5e6a25b3f..2ebff3f5cf25d 100644 --- a/python/paddle/utils/cpp_extension/extension_utils.py +++ b/python/paddle/utils/cpp_extension/extension_utils.py @@ -1326,6 +1326,7 @@ def _jit_compile(file_path, verbose=False): """ Build shared library in subprocess """ + assert os.path.exists(file_path) ext_dir = os.path.dirname(file_path) setup_file = os.path.basename(file_path)