summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2022-10-07 00:12:54 +0300
committerGitHub <noreply@github.com>2022-10-07 00:12:54 +0300
commit384c13e3fc5e5c9cb6340209f763dc421b4c301b (patch)
treed57e39c29950197c13f3f182e055a631c1cbb0b6 /numpy/lib/utils.py
parent562c80a9fb6ffae6f8d02abf6687437830bb6615 (diff)
parent81bc4565b50c6cebb21c95c685285e32e1fb9b65 (diff)
downloadnumpy-384c13e3fc5e5c9cb6340209f763dc421b4c301b.tar.gz
Merge pull request #22393 from seberg/npy_header
MAINT: Ensure graceful handling of large header sizes
Diffstat (limited to 'numpy/lib/utils.py')
-rw-r--r--numpy/lib/utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/lib/utils.py b/numpy/lib/utils.py
index f9d29e89d..afde8cc60 100644
--- a/numpy/lib/utils.py
+++ b/numpy/lib/utils.py
@@ -1036,6 +1036,12 @@ def safe_eval(source):
Evaluate a string containing a Python literal expression without
allowing the execution of arbitrary non-literal code.
+ .. warning::
+
+ This function is identical to :py:meth:`ast.literal_eval` and
+ has the same security implications. It may not always be safe
+ to evaluate large input strings.
+
Parameters
----------
source : str