[Python-Dev] Re: [Python-checkins] python/dist/src/Objects stringobject.c,2.193,2.194 unicodeobject.c,2.171,2.172

Michael Hudson mwh@python.net
11 Oct 2002 10:57:29 +0100


gvanrossum@users.sourceforge.net writes:
> Update of /cvsroot/python/python/dist/src/Objects
> In directory usw-pr-cvs1:/tmp/cvs-serv19831
>> Modified Files:
> 	stringobject.c unicodeobject.c 
> Log Message:
> 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.

No test case? For shame!
I'll do one if you don't beat me to it.
Cheers,
M.
-- 
 And then the character-only displays went away (leading to
 increasingly silly graphical effects and finally to ads on
 web pages). -- John W. Baxter, comp.lang.python

AltStyle によって変換されたページ (->オリジナル) /