Staging
v0.5.1
https://github.com/python/cpython
Revision 3e3566937e3597651b06d95aef9b1b75d0f6899d authored by Andrew M. Kuchling on 05 October 2006, 19:42:49 UTC, committed by Andrew M. Kuchling on 05 October 2006, 19:42:49 UTC
 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.
1 parent 32f378b
History
Tip revision: 3e3566937e3597651b06d95aef9b1b75d0f6899d authored by Andrew M. Kuchling on 05 October 2006, 19:42:49 UTC
[Backport r50679 | neal.norwitz. This is the last Klocwork bug to be
Tip revision: 3e35669
File Mode Size
acceler.c -rw-r--r-- 2.8 KB
bitset.c -rw-r--r-- 949 bytes
firstsets.c -rw-r--r-- 2.2 KB
grammar.c -rw-r--r-- 5.2 KB
grammar.mak -rw-r--r-- 1.3 KB
grammar1.c -rw-r--r-- 1.0 KB
intrcheck.c -rw-r--r-- 2.4 KB
listnode.c -rw-r--r-- 983 bytes
metagrammar.c -rw-r--r-- 2.2 KB
myreadline.c -rw-r--r-- 5.4 KB
node.c -rw-r--r-- 3.5 KB
parser.c -rw-r--r-- 8.9 KB
parser.h -rw-r--r-- 1000 bytes
parsetok.c -rw-r--r-- 5.1 KB
pgen.c -rw-r--r-- 14.2 KB
pgenmain.c -rw-r--r-- 3.2 KB
printgrammar.c -rw-r--r-- 2.4 KB
tokenizer.c -rw-r--r-- 32.4 KB
tokenizer.h -rw-r--r-- 2.3 KB
tokenizer_pgen.c -rw-r--r-- 36 bytes

back to top