summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-07-12 05:27:46 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-07-12 05:27:46 (GMT)
commit7e49c6eee88c72c53969da31db95a526742191ef (patch)
tree909d3ea9fef4fc16c7ce4963a879fec13fc7f5ea /Objects
parent41efc144980d27f62c74ae864819e21070f0ce90 (diff)
downloadcpython-7e49c6eee88c72c53969da31db95a526742191ef.zip
cpython-7e49c6eee88c72c53969da31db95a526742191ef.tar.gz
cpython-7e49c6eee88c72c53969da31db95a526742191ef.tar.bz2
Fix uninitialized memory read reported by Valgrind when running doctest.
This could happen if size == 0.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/codeobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c
index a9bcb01..89871d6 100644
--- a/Objects/codeobject.c
+++ b/Objects/codeobject.c
@@ -556,6 +556,7 @@ PyCode_CheckLineNumber(PyCodeObject* co, int lasti, PyAddrPair *bounds)
the line increments here, treating them as byte
increments gets confusing, to say the least. */
+ bounds->ap_lower = 0;
while (size > 0) {
if (addr + *p > lasti)
break;