diff --git a/mercurial/pathencode.c b/mercurial/pathencode.c
index 9d88916fb56f2974717f0856caf907ef41ec66c3_bWVyY3VyaWFsL3BhdGhlbmNvZGUuYw==..8bed40e02c3bb8f429c20ebbb25c68a734bc9bdc_bWVyY3VyaWFsL3BhdGhlbmNvZGUuYw== 100644
--- a/mercurial/pathencode.c
+++ b/mercurial/pathencode.c
@@ -696,7 +696,7 @@
 	return 0;
 }
 
-#define MAXENCODE 4096 * 3
+#define MAXENCODE 4096 * 4
 
 static PyObject *hashencode(const char *src, Py_ssize_t len)
 {