commit | 602d307ac5e8a2da38a193dca3bdfef5994dfe67 | [log] [tgz] |
---|---|---|
author | Zackery Spytz <zspytz@gmail.com> | Fri Dec 07 05:17:43 2018 -0700 |
committer | Serhiy Storchaka <storchaka@gmail.com> | Fri Dec 07 14:17:43 2018 +0200 |
tree | 8e876e0142683a7564a391dc6396bc6d33f08639 | |
parent | 2db190bb356d00422087e1286637887efb8d97c5 [diff] [blame] |
bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. (GH-11015) (GH-11020) (cherry picked from commit 4c49da0cb7434c676d70b9ccf38aca82ac0d64a9)
diff --git a/Python/pystrtod.c b/Python/pystrtod.c index 461e8dc..fea7e45 100644 --- a/Python/pystrtod.c +++ b/Python/pystrtod.c
@@ -398,6 +398,9 @@ } dup = PyMem_Malloc(orig_len + 1); + if (dup == NULL) { + return PyErr_NoMemory(); + } end = dup; prev = '\0'; last = s + orig_len;