[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-tar] octal reading in spec
From: |
NBC |
Subject: |
[Bug-tar] octal reading in spec |
Date: |
Wed, 09 Aug 2006 22:30:24 +0200 |
User-agent: |
Thunderbird 1.5.0.5 (Windows/20060719) |
in the manual it's written
>The `chksum' field is the ASCII representation of the octal value of
>the simple sum of all bytes in the header block. Each 8-bit byte in
>the header is added to an unsigned integer, initialized to zero, the
>precision of which shall be no less than seventeen bits. When
>calculating the checksum, the `chksum' field is treated as if it were
>all blanks.
and when i check "tar-1.15.91.tar" i've got for the 1st entry
30 31 32 36 31 32 00 20
char chksum[8]; /* 148 */
30 31 32 36 31 32 is the checksum in octal
but what is 00 20
>All other fields are zero-filled
>octal numbers in ASCII. Each numeric field of width W contains W minus
>1 digits, and a null.
shouldnt it have been
30 30 31 32 36 31 32 00
??
or anything after \0 is garbage
- [Bug-tar] octal reading in spec,
NBC <=