]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[Backport r50679 | neal.norwitz. This is the last Klocwork bug to be
authorAndrew M. Kuchling <amk@amk.ca>
Thu, 5 Oct 2006 19:42:49 +0000 (19:42 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Thu, 5 Oct 2006 19:42:49 +0000 (19:42 +0000)
commit3e3566937e3597651b06d95aef9b1b75d0f6899d
treeb0992c9346efbd2430b81331aff9358c02f2bc56
parent32f378b0d925d960c3f72c0fd646c7b1b3237b5f
[Backport r50679 | neal.norwitz.  This is the last Klocwork bug to be
 backported.]

Use sizeof(buffer) instead of duplicating the constants to ensure they won't
be wrong.

The real change is to pass (bufsz - 1) to PyOS_ascii_formatd and 1
to strncat.  strncat copies n+1 bytes from src (not dest).

Reported by Klocwork #58.
Objects/complexobject.c