Fix uninitialized memory read reported by Valgrind when running doctest.

This could happen if size == 0.
This commit is contained in:
Neal Norwitz 2006-07-12 05:27:46 +00:00
parent 41efc14498
commit 7e49c6eee8
1 changed files with 1 additions and 0 deletions

View File

@ -556,6 +556,7 @@ PyCode_CheckLineNumber(PyCodeObject* co, int lasti, PyAddrPair *bounds)
the line increments here, treating them as byte the line increments here, treating them as byte
increments gets confusing, to say the least. */ increments gets confusing, to say the least. */
bounds->ap_lower = 0;
while (size > 0) { while (size > 0) {
if (addr + *p > lasti) if (addr + *p > lasti)
break; break;