mercurial/pure/parsers.py
changeset 14421 639f26cab2f5
parent 14064 e4bfb9c337f3
child 14995 8d928799dab5
--- a/mercurial/pure/parsers.py	Tue May 24 14:08:20 2011 +0200
+++ b/mercurial/pure/parsers.py	Tue May 24 13:30:10 2011 -0500
@@ -56,6 +56,9 @@
             n += 1
             off += s
 
+    if off != len(data):
+        raise ValueError('corrupt index file')
+
     if index:
         e = list(index[0])
         type = gettype(e[0])