commit | 4b0a315c3179c1785fcec6857ed4a69417fd7ae8 | [log] [tgz] |
---|---|---|
author | Neal Norwitz <nnorwitz@gmail.com> | Sun Jul 16 02:22:30 2006 +0000 |
committer | Neal Norwitz <nnorwitz@gmail.com> | Sun Jul 16 02:22:30 2006 +0000 |
tree | 6d8452c61091f295b61c7c307949df5dad942111 | |
parent | c0cde4da2a3d7992b7405ed5e11bc43f7d2391a0 [diff] |
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.