[Debburn-devel] Possible bug in 4GiB filesize check

Thomas Schmitt scdbackup at gmx.net
Wed Jun 12 20:48:37 UTC 2013


Hi,

> fprintf(stderr, "File %s is larger than 4GiB-1.\n", whole_path);

It seems that -iso-level 3 has no other effect than -iso-level 2.

It should switch to multi-extent representation of files larger
than 4 GiB - 1.


> The Wikipedia article on ISO9660 also seems to indicate that sizes of 4GiB-1
> are acceptable,

That's true. Extents have a size field of 32 bit. Thus 0xffffffff is
the highest representable size.
But ISO 9660 level 3 allows to have more than one extent with the
same file name. All extents of a file have to form a consequtive
sequence of blocks. There is no other restriction except the overall
size limit of an ISO 9660 filesystem to 2 exp 43 - 2048 bytes.

At least Linux kernels can properly represent multi-extent files.
Your mileage with FreeBSD and Solaris may vary.


> so if you concur, the test operator should be changed to ">".

Is it guaranteed in genisoimage's build software that off_t has
64 bit ?
If not, then (lstatbuf.st_size > (off_t)0xFFFFFFFF) would never
be true. The compiler would warn, but stat() should not report
file sizes > 0xFFFFFFFF anyway. So it would be harmless noise.


-----

I can offer xorriso's emulation of mkisofs: xorrisofs.
It should suffice if you do not need UDF or HFS.

It does ISO 9660 level 3 up to 400 GiB per file (a deliberate limit).

-----

> I installed a Blu-Ray burner

But you don't operate this by wodim, do you ?


Have a nice day :)

Thomas




More information about the Debburn-devel mailing list