aboutsummaryrefslogtreecommitdiff
path: root/lib/fstream/internal.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-06 19:09:29 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-06 22:08:36 +0100
commit31c30ced2d23bea1d8ddeaca685cfaa7ffb1a75d (patch)
tree446a38056e1aeb52f824fd390a1f2c2849b69dfa /lib/fstream/internal.h
parentacb690df464829f58bc7e29abaab7e07349e8e3a (diff)
Fix: meta reader behaviour if accessing block at location 0
Technically, this should *never* **ever** happen, because a SquashFS file always starts with a super block, which isn't wrapped in a meta data block, so a valid SquashFS file will never have a reason to read from offset 0. However, this does bite us when doing unit tests where the meta reader and writer are used on an otherwise empty file. When trying to read from offset 0, the caching code assumes that we already have that block, since tha block_offset got initialized to 0. This commit changes the initialization to set the current block location to the maximum 64 bit integer, a location we are never going to read from, since it will always be after the limit. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/fstream/internal.h')
0 files changed, 0 insertions, 0 deletions