mercurial/cext/parsers.c
changeset 48027 13efd8fdc55f
parent 48025 631f6b445a77
child 48028 448aff4e8dd4
--- a/mercurial/cext/parsers.c	Mon Sep 20 20:55:38 2021 +0200
+++ b/mercurial/cext/parsers.c	Thu Sep 23 16:44:17 2021 +0900
@@ -770,6 +770,8 @@
 
 		entry = (PyObject *)dirstate_item_from_v1_data(state, mode,
 		                                               size, mtime);
+		if (!entry)
+			goto quit;
 		cpos = memchr(cur, 0, flen);
 		if (cpos) {
 			fname = PyBytes_FromStringAndSize(cur, cpos - cur);