Mercurial > hg-stable
changeset 38022:312d7d14d44e
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 11 May 2018 07:31:51 -0700 |
parents | 8ba0344f9fb1 |
children | 5ac72e07692a |
files | mercurial/cext/revlog.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cext/revlog.c Fri May 11 22:07:43 2018 -0400 +++ b/mercurial/cext/revlog.c Fri May 11 07:31:51 2018 -0700 @@ -1285,7 +1285,9 @@ 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