diff options
Diffstat (limited to 'Lib/pickle.py')
-rw-r--r-- | Lib/pickle.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pickle.py b/Lib/pickle.py index e81a379..161c2e9 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -951,7 +951,7 @@ class _Unpickler: rep = orig[:-1] for q in (b'"', b"'"): # double or single quote if rep.startswith(q): - if not rep.endswith(q): + if len(rep) < 2 or not rep.endswith(q): raise ValueError("insecure string pickle") rep = rep[len(q):-len(q)] break |