changeset 47863:8d297f3563be stable

revlog: fix more type confusion in index_replace_sidedata_info (issue6580) We were telling python that "rev" was a Py_ssize_t (via the "n" format), but it was actually an int. Differential Revision: https://phab.mercurial-scm.org/D11335
author Julien Cristau <jcristau@debian.org>
date Tue, 24 Aug 2021 23:42:35 +0200
parents 16346f3d446d
children ad2c37075f46
files mercurial/cext/revlog.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cext/revlog.c	Tue Aug 24 12:44:34 2021 +0200
+++ b/mercurial/cext/revlog.c	Tue Aug 24 23:42:35 2021 +0200
@@ -535,7 +535,8 @@
 static PyObject *index_replace_sidedata_info(indexObject *self, PyObject *args)
 {
 	uint64_t offset_flags, sidedata_offset;
-	int rev, sidedata_comp_len;
+	Py_ssize_t rev;
+	int sidedata_comp_len;
 	char comp_mode;
 	char *data;
 #if LONG_MAX == 0x7fffffffL