Show More
@@ -145,8 +145,13 b' Test corrupted p1/p2 fields that could c' | |||
|
145 | 145 | > ] |
|
146 | 146 | > for n, p in poisons: |
|
147 | 147 | > # corrupt p1 at rev0 and p2 at rev1 |
|
148 | > d = data[:24] + p + data[28:127 + 28] + p + data[127 + 32:] | |
|
149 | > open(n + b"/.hg/store/00changelog.i", "wb").write(d) | |
|
148 | > rev_0 = data[:64 + 63] | |
|
149 | > rev_1 = data[64 + 63:] | |
|
150 | > altered_rev_0 = rev_0[:24] + p + rev_0[24 + 4:] | |
|
151 | > altered_rev_1 = rev_1[:28] + p + rev_1[28 + 4:] | |
|
152 | > new_data = altered_rev_0 + altered_rev_1 | |
|
153 | > with open(n + b"/.hg/store/00changelog.i", "wb") as f: | |
|
154 | > f.write(new_data) | |
|
150 | 155 | > EOF |
|
151 | 156 | |
|
152 | 157 |
$ |
General Comments 0
You need to be logged in to leave comments.
Login now