mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Fix uninitialized memory read reported by Valgrind when running doctest.
This could happen if size == 0.
This commit is contained in:
parent
41efc14498
commit
7e49c6eee8
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue