From patchwork Wed Jan 31 04:35:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D1948: lazymanifest: avoid reading uninitialized memory From: phabricator X-Patchwork-Id: 27085 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Wed, 31 Jan 2018 04:35:58 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG113a30b87716: lazymanifest: avoid reading uninitialized memory (authored by quark, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1948?vs=5019&id=5020 REVISION DETAIL https://phab.mercurial-scm.org/D1948 AFFECTED FILES mercurial/cext/manifest.c CHANGE DETAILS To: quark, #hg-reviewers, indygreg Cc: mercurial-devel diff --git a/mercurial/cext/manifest.c b/mercurial/cext/manifest.c --- a/mercurial/cext/manifest.c +++ b/mercurial/cext/manifest.c @@ -778,11 +778,11 @@ PyObject *outer; /* If we're looking at a deleted entry and it's not * the end of the manifest, just skip it. */ - if (left->deleted && sneedle < self->numlines) { + if (sneedle < self->numlines && left->deleted) { sneedle++; continue; } - if (right->deleted && oneedle < other->numlines) { + if (oneedle < other->numlines && right->deleted) { oneedle++; continue; }