Store block last offset instead of block size
commitd0ec586c02c441b352efb1ec763270e84335f5ca
authorPetr Tesarik <petr@tesarici.cz>
Tue, 15 May 2018 06:42:46 +0000 (15 08:42 +0200)
committerPetr Tesarik <petr@tesarici.cz>
Tue, 15 May 2018 08:12:42 +0000 (15 10:12 +0200)
tree85f8d3a59efb548579b86172e20e53c98b671cc5
parent8727f5b66d60a9ee2b3b7afcc69bd878afb8b2ea
Store block last offset instead of block size

This is necessary to allow using the full hed_uoff_t range as file
offset. Note that this commit alone is not sufficient, because many
places still use block size in an unsafe manner.

It is OK to keep cover_size in tree nodes, because this is an
internal-only field, and I have verified that it still works
properly in all places in case it overflows to zero.

Signed-off-by: Petr Tesarik <petr@tesarici.cz>
libhed/file.c
libhed/file.h
libhed/tree.c
libhed/types.h