Commit ffed3ade authored by David Symonds's avatar David Symonds

Regenerate v7.tar with a real V7 tar.

Fix octal parsing that it unearthed.

R=rsc
APPROVED=rsc
DELTA=11  (5 added, 0 deleted, 6 changed)
OCL=32924
CL=32945
parent 266a2c47
......@@ -75,7 +75,12 @@ func cString(b []byte) string {
}
func (tr *Reader) octal(b []byte) int64 {
if len(b) > 0 && b[len(b)-1] == ' ' {
// Removing leading spaces.
for len(b) > 0 && b[0] == ' ' {
b = b[1:len(b)];
}
// Removing trailing NULs and spaces.
for len(b) > 0 && (b[len(b)-1] == ' ' || b[len(b)-1] == '\x00') {
b = b[0:len(b)-1];
}
x, err := strconv.Btoui64(cString(b), 8);
......
......@@ -84,20 +84,20 @@ var untarTests = []*untarTest{
headers: []*Header{
&Header{
Name: "small.txt",
Mode: 0640,
Mode: 0444,
Uid: 73025,
Gid: 5000,
Size: 5,
Mtime: 1246508266,
Mtime: 1244593104,
Typeflag: '\x00',
},
&Header{
Name: "small2.txt",
Mode: 0640,
Mode: 0444,
Uid: 73025,
Gid: 5000,
Size: 11,
Mtime: 1245217492,
Mtime: 1244593104,
Typeflag: '\x00',
},
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment