lazymanifest: fail if path or hash strings cannot be created
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 11 Mar 2015 13:35:34 -0700
changeset 24293 30e9ee203846
parent 24292 b7add2ebef9e
child 24294 3d485727e45e
lazymanifest: fail if path or hash strings cannot be created While generating (path, hash, flags), we fail if flags cannot be created. We should also fail if path or hash cannot be created.
mercurial/manifest.c
--- a/mercurial/manifest.c	Wed Mar 11 08:28:56 2015 -0700
+++ b/mercurial/manifest.c	Wed Mar 11 13:35:34 2015 -0700
@@ -243,7 +243,7 @@
 	consumed = pl + 41;
 	flags = PyString_FromStringAndSize(l->start + consumed,
 									   l->len - consumed - 1);
-	if (!flags) {
+	if (!path || !hash || !flags) {
 		goto bail;
 	}
 	ret = PyTuple_Pack(3, path, hash, flags);