]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[Backport r50783 | neal.norwitz. The bytes_left code is complicated,
authorAndrew M. Kuchling <amk@amk.ca>
Thu, 5 Oct 2006 18:49:36 +0000 (18:49 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Thu, 5 Oct 2006 18:49:36 +0000 (18:49 +0000)
commitda604c19923ef1fd365a0ace5bb8c6e0bbe763ce
tree4abcf918cdd4e16d2892f9eed79c751f5c640a83
parent978809518d823c6f67ed7be2563de52275ea8623
[Backport r50783 | neal.norwitz.  The bytes_left code is complicated,
 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.
Modules/_bsddb.c