Staging
v0.5.1
https://github.com/python/cpython
Revision da604c19923ef1fd365a0ace5bb8c6e0bbe763ce authored by Andrew M. Kuchling on 05 October 2006, 18:49:36 UTC, committed by Andrew M. Kuchling on 05 October 2006, 18:49:36 UTC
 but looks correct on a casual inspection and hasn't been modified
 in the trunk.  Does anyone want to review further?]

Ensure we don't write beyond errText.  I think I got this right, but
it definitely could use some review to ensure I'm not off by one
and there's no possible overflow/wrap-around of bytes_left.
Reported by Klocwork #1.

Fix a problem if there is a failure allocating self->db.
Found with failmalloc.
1 parent 9788095
History
Tip revision: da604c19923ef1fd365a0ace5bb8c6e0bbe763ce authored by Andrew M. Kuchling on 05 October 2006, 18:49:36 UTC
[Backport r50783 | neal.norwitz. The bytes_left code is complicated,
Tip revision: da604c1
File Mode Size
Python.h -rw-r--r-- 4.1 KB
abstract.h -rw-r--r-- 36.0 KB
bitset.h -rw-r--r-- 792 bytes
boolobject.h -rw-r--r-- 914 bytes
bufferobject.h -rw-r--r-- 893 bytes
cStringIO.h -rw-r--r-- 1.9 KB
cellobject.h -rw-r--r-- 653 bytes
ceval.h -rw-r--r-- 4.6 KB
classobject.h -rw-r--r-- 2.8 KB
cobject.h -rw-r--r-- 1.7 KB
codecs.h -rw-r--r-- 4.6 KB
compile.h -rw-r--r-- 3.2 KB
complexobject.h -rw-r--r-- 1.4 KB
datetime.h -rw-r--r-- 8.1 KB
descrobject.h -rw-r--r-- 2.1 KB
dictobject.h -rw-r--r-- 5.2 KB
enumobject.h -rw-r--r-- 253 bytes
errcode.h -rw-r--r-- 1.3 KB
eval.h -rw-r--r-- 557 bytes
fileobject.h -rw-r--r-- 2.2 KB
floatobject.h -rw-r--r-- 3.7 KB
frameobject.h -rw-r--r-- 2.5 KB
funcobject.h -rw-r--r-- 2.9 KB
genobject.h -rw-r--r-- 704 bytes
graminit.h -rw-r--r-- 1.7 KB
grammar.h -rw-r--r-- 2.0 KB
import.h -rw-r--r-- 1.7 KB
intobject.h -rw-r--r-- 1.9 KB
intrcheck.h -rw-r--r-- 274 bytes
iterobject.h -rw-r--r-- 526 bytes
listobject.h -rw-r--r-- 2.4 KB
longintrepr.h -rw-r--r-- 2.1 KB
longobject.h -rw-r--r-- 4.5 KB
marshal.h -rw-r--r-- 706 bytes
metagrammar.h -rw-r--r-- 253 bytes
methodobject.h -rw-r--r-- 3.1 KB
modsupport.h -rw-r--r-- 3.6 KB
moduleobject.h -rw-r--r-- 605 bytes
node.h -rw-r--r-- 850 bytes
object.h -rw-r--r-- 28.7 KB
objimpl.h -rw-r--r-- 12.3 KB
opcode.h -rw-r--r-- 4.2 KB
osdefs.h -rw-r--r-- 942 bytes
parsetok.h -rw-r--r-- 1.3 KB
patchlevel.h -rw-r--r-- 1.2 KB
pgen.h -rw-r--r-- 253 bytes
pgenheaders.h -rw-r--r-- 1.1 KB
py_curses.h -rw-r--r-- 4.1 KB
pydebug.h -rw-r--r-- 1.0 KB
pyerrors.h -rw-r--r-- 8.9 KB
pyfpe.h -rw-r--r-- 8.3 KB
pygetopt.h -rw-r--r-- 306 bytes
pymactoolbox.h -rw-r--r-- 7.2 KB
pymem.h -rw-r--r-- 3.9 KB
pyport.h -rw-r--r-- 19.5 KB
pystate.h -rw-r--r-- 5.6 KB
pystrtod.h -rw-r--r-- 356 bytes
pythonrun.h -rw-r--r-- 5.5 KB
pythread.h -rw-r--r-- 1.2 KB
rangeobject.h -rw-r--r-- 708 bytes
setobject.h -rw-r--r-- 1.0 KB
sliceobject.h -rw-r--r-- 1.1 KB
stringobject.h -rw-r--r-- 6.4 KB
structmember.h -rw-r--r-- 2.3 KB
structseq.h -rw-r--r-- 862 bytes
symtable.h -rw-r--r-- 3.6 KB
sysmodule.h -rw-r--r-- 819 bytes
timefuncs.h -rw-r--r-- 442 bytes
token.h -rw-r--r-- 1.7 KB
traceback.h -rw-r--r-- 624 bytes
tupleobject.h -rw-r--r-- 2.0 KB
ucnhash.h -rw-r--r-- 682 bytes
unicodeobject.h -rw-r--r-- 41.5 KB
weakrefobject.h -rw-r--r-- 2.4 KB

back to top