]> git.draconx.ca Git - liblbx.git/commit
liblbx: Correct EOF handling in lbx_file_read.
authorNick Bowler <nbowler@draconx.ca>
Fri, 31 Jan 2014 05:21:04 +0000 (00:21 -0500)
committerNick Bowler <nbowler@draconx.ca>
Fri, 31 Jan 2014 05:43:07 +0000 (00:43 -0500)
commit59d43aadba53b164dc529cfef069c5aeb9a65807
treec729f74bfa5f9c9047051d21b20acbec5ba39579
parent8e1fbe44dde847482ecdf54f97d31a5322a2fd92
liblbx: Correct EOF handling in lbx_file_read.

We should never see an EOF from the underlying I/O when reading archive
members, because we setup the read request to only return bytes that are
supposed to be there.

So if EOF happens, flag this as an error and do *not* set the eof flag
in the state structure.  Also fixup lbxtool to properly handle this.
src/lbx.c
src/lbxtool.c
tests/broken-archives.tap