summaryrefslogtreecommitdiff
path: root/Python/dtoa.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-11-12 14:35:46 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-11-12 14:35:46 +0200
commitb51bd875193c84e51afb907a0c8ff6091fc95d5f (patch)
treed2e3c85d92f1ae680f0c90b4b4fc88cce58ecba0 /Python/dtoa.c
parente7ed9c7bd2204dd48d67eb7b14813c0338a85a0c (diff)
parentf246749b9aa9cdb1f05eca29b7eef6a04e05fc8b (diff)
downloadcpython-b51bd875193c84e51afb907a0c8ff6091fc95d5f.tar.gz
Issue #28648: Fixed crash in Py_DecodeLocale() in debug build on Mac OS X
when decode astral characters.
Diffstat (limited to 'Python/dtoa.c')
-rw-r--r--Python/dtoa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/dtoa.c b/Python/dtoa.c
index 8996a7210c..3da546ed07 100644
--- a/Python/dtoa.c
+++ b/Python/dtoa.c
@@ -373,7 +373,7 @@ Balloc(int k)
x = 1 << k;
len = (sizeof(Bigint) + (x-1)*sizeof(ULong) + sizeof(double) - 1)
/sizeof(double);
- if (k <= Kmax && pmem_next - private_mem + len <= PRIVATE_mem) {
+ if (k <= Kmax && pmem_next - private_mem + len <= (Py_ssize_t)PRIVATE_mem) {
rv = (Bigint*)pmem_next;
pmem_next += len;
}
@@ -1087,7 +1087,7 @@ sd2b(U *d, int scale, int *e)
b = Balloc(1);
if (b == NULL)
return NULL;
-
+
/* First construct b and e assuming that scale == 0. */
b->wds = 2;
b->x[0] = word1(d);