]> granicus.if.org Git - python/commit
Use sizeof(buffer) instead of duplicating the constants to ensure they won't
authorNeal Norwitz <nnorwitz@gmail.com>
Sun, 16 Jul 2006 02:22:30 +0000 (02:22 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sun, 16 Jul 2006 02:22:30 +0000 (02:22 +0000)
commit4b0a315c3179c1785fcec6857ed4a69417fd7ae8
tree6d8452c61091f295b61c7c307949df5dad942111
parentc0cde4da2a3d7992b7405ed5e11bc43f7d2391a0
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