Staging
v0.5.1
https://github.com/python/cpython
Revision d9ddf59d28dd17f4a3aecf5e1964ae849805cf48 authored by Guido van Rossum on 11 October 2002, 00:47:20 UTC, committed by Guido van Rossum on 11 October 2002, 00:47:20 UTC
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.
1 parent ebc6a65
History
Tip revision: d9ddf59d28dd17f4a3aecf5e1964ae849805cf48 authored by Guido van Rossum on 11 October 2002, 00:47:20 UTC
Backport stringobject.c 2.194 and unicodeobject.c 2.172:
Tip revision: d9ddf59
File Mode Size
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
RISCOS
Tools
.cvsignore -rw-r--r-- 109 bytes
.hgtags -rw-r--r-- 2.3 KB
LICENSE -rw-r--r-- 12.3 KB
Makefile.pre.in -rw-r--r-- 25.9 KB
PLAN.txt -rw-r--r-- 14.1 KB
README -rw-r--r-- 41.7 KB
acconfig.h -rw-r--r-- 7.5 KB
configure -rwxr-xr-x 210.1 KB
configure.in -rw-r--r-- 55.6 KB
install-sh -rwxr-xr-x 5.5 KB
pyconfig.h.in -rw-r--r-- 19.6 KB
setup.py -rw-r--r-- 34.5 KB

README

back to top