# HG changeset patch # User Martin von Zweigbergk # Date 2015-03-11 20:35:34 # Node ID 30e9ee2038462725f706e14819a799ceedefcb71 # Parent b7add2ebef9e41b91a1cd16a0cf149f517527cf0 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. diff --git a/mercurial/manifest.c b/mercurial/manifest.c --- a/mercurial/manifest.c +++ b/mercurial/manifest.c @@ -243,7 +243,7 @@ static PyObject *lmiter_iternext(PyObjec 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);