[PATCH 2 of 6 lazymanifest-errors] lazymanifest: check another error return in delitem
Augie Fackler
raf at durin42.com
Thu Dec 31 13:05:46 CST 2015
# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1451587231 18000
# Thu Dec 31 13:40:31 2015 -0500
# Node ID 2cde05d091f1e053f4cf57db579acdd98b8935cf
# Parent 0d56affe821052f6763f1796341d892c68339fa9
lazymanifest: check another error return in delitem
diff --git a/mercurial/manifest.c b/mercurial/manifest.c
--- a/mercurial/manifest.c
+++ b/mercurial/manifest.c
@@ -416,6 +416,9 @@ static int lazymanifest_delitem(lazymani
return -1;
}
needle.start = PyString_AsString(key);
+ if (!needle.start) {
+ return -1;
+ }
hit = bsearch(&needle, self->lines, self->numlines, sizeof(line),
&linecmp);
if (!hit || hit->deleted) {
More information about the Mercurial-devel
mailing list