# HG changeset patch # User Martin von Zweigbergk # Date 2018-05-11 14:31:51 # Node ID 312d7d14d44e8fa0a8d032df519c9191db22f618 # Parent 8ba0344f9fb145f5b9b909f1211defc9e0793f68 revlog: handle error from node lookup I missed this in D3499. Thanks to Yuya for spotting it. Differential Revision: https://phab.mercurial-scm.org/D3530 diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c --- a/mercurial/cext/revlog.c +++ b/mercurial/cext/revlog.c @@ -1285,7 +1285,9 @@ static int nt_shortest(indexObject *self if (v < 0) { const char *n; v = -(v + 1); - n = index_node(self, v); + n = index_node_existing(self, v); + if (n == NULL) + return -3; if (memcmp(node, n, 20) != 0) /* * Found a unique prefix, but it wasn't for the