]> granicus.if.org Git - python/commitdiff
Fix uninitialized memory read reported by Valgrind when running doctest.
authorNeal Norwitz <nnorwitz@gmail.com>
Wed, 12 Jul 2006 05:27:46 +0000 (05:27 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Wed, 12 Jul 2006 05:27:46 +0000 (05:27 +0000)
This could happen if size == 0.

Objects/codeobject.c

index a9bcb0179e076565d5bd0675005993fecec56af3..89871d6cf126f6fa6346ad1230674cd556fa1c63 100644 (file)
@@ -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;