D5347: manifest: reject lines shorter than 42 bytes, not 22

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Fri Nov 30 07:07:25 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG7e6834ade51d: manifest: reject lines shorter than 42 bytes, not 22 (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5347?vs=12659&id=12662

REVISION DETAIL
  https://phab.mercurial-scm.org/D5347

AFFECTED FILES
  mercurial/cext/manifest.c

CHANGE DETAILS

diff --git a/mercurial/cext/manifest.c b/mercurial/cext/manifest.c
--- a/mercurial/cext/manifest.c
+++ b/mercurial/cext/manifest.c
@@ -127,11 +127,11 @@
 		if (!next) {
 			return MANIFEST_MALFORMED;
 		}
-		if ((next - data) < 22) {
-			/* We should have at least 22 bytes in a line:
+		if ((next - data) < 42) {
+			/* We should have at least 42 bytes in a line:
 			   1 byte filename
 			   1 NUL
-			   20 bytes of hash
+			   40 bytes of hash
 			   so we can give up here.
 			*/
 			return MANIFEST_TOO_SHORT_LINE;



To: durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list