On Mon, Jan 02, 2006 at 10:05:21PM +0100, Otto Moerbeek wrote:
> > If I don't misinterpret the code, the problem is that the size for
> > a 10GB file needs 12 octal digits, which doen't fit 0-terminated
> > into hd->size.
> 
> Wonder if hd->size should be 0-terminated, but no time to check now.

IMHO, it should.

Quoting 1003.1 (2004 ed.): [The last sentence is important]

        The fields magic, uname, and gname are character strings
        each terminated by a NUL character. The fields name, linkname,
        and prefix are NUL-terminated character strings except when
        all characters in the array contain non-NUL characters
        including the last character.  The version field is two
        octets containing the characters "00" (zero-zero). The
        typeflag contains a single character. All other fields are
        leading zero-filled octal numbers using digits from the
        ISO/IEC 646:1991 standard IRV. Each numeric field is
        terminated by one or more <space> or NUL characters.

It's POSIX, thus it's odd.

Ciao,
        Kili

Reply via email to