diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-06-20 18:52:46 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-06-20 19:18:32 +0200 |
commit | 94cfa86b56792e8b95e3807c8174e348d70eac59 (patch) | |
tree | 0cdb4c2d994e9b9ed56d0112c2a2906b283e51df /configure.ac | |
parent | eda4afe79218d60271630eeb97eabad4a6cdf20b (diff) |
Fix block bounds checking in libsquashfs data reader
Instead of doing the fragile size comparison in both loops, simply
bail from the function if offset is out of bounds, clamp the size
to the available range of the file and abail if it is zero.
As a result, a lot of checks can be removed and the function will not
return data beyond EOF.
This problem occoured with files that have a short last block instead
of a fragment.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'configure.ac')
0 files changed, 0 insertions, 0 deletions