summaryrefslogtreecommitdiffstats
path: root/pyconfig.h.in
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-10-11 00:43:48 (GMT)
committerGuido van Rossum <guido@python.org>2002-10-11 00:43:48 (GMT)
commit049cd6b563892b64edd606cfdf36c5d0f30b7b16 (patch)
treea4a1c761bbb6117dabc2a6e673b534e812f21088 /pyconfig.h.in
parentf689b88e11535443f72e67eea43db9aa944699e1 (diff)
downloadcpython-049cd6b563892b64edd606cfdf36c5d0f30b7b16.zip
cpython-049cd6b563892b64edd606cfdf36c5d0f30b7b16.tar.gz
cpython-049cd6b563892b64edd606cfdf36c5d0f30b7b16.tar.bz2
Fix a nasty endcase reported by Armin Rigo in SF bug 618623:
'%2147483647d' % -123 segfaults. This was because an integer overflow in a comparison caused the string resize to be skipped. After fixing the overflow, this could call _PyString_Resize() with a negative size, so I (1) test for that and raise MemoryError instead; (2) also added a test for negative newsize to _PyString_Resize(), raising SystemError as for all bad arguments. An identical bug existed in unicodeobject.c, of course. Will backport to 2.2.2.
Diffstat (limited to 'pyconfig.h.in')
0 files changed, 0 insertions, 0 deletions