diff options
author | Richard Jones <rjones@redhat.com> | 2010-05-07 13:30:42 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-05-07 15:27:29 +0100 |
commit | 42f59b28f123f53ae038df23a9abee08e959e46b (patch) | |
tree | 4ac2c3ac492680659fffde3b4316703c74953bcd /src/guestfs.c | |
parent | a84f1360499309e2d2ecb661adc6917539b5eef4 (diff) | |
download | libguestfs-42f59b28f123f53ae038df23a9abee08e959e46b.tar.gz libguestfs-42f59b28f123f53ae038df23a9abee08e959e46b.tar.xz libguestfs-42f59b28f123f53ae038df23a9abee08e959e46b.zip |
daemon: Fix read-file so it fails gracefully for large files (RHBZ#589039).
Pengzhen Cao noticed that read-file would fail for files
larger than the protocol size; this is *not* the bug. However
it would also lose protocol synchronization after this.
The reason was that functions which return RBufferOut in the
generator must not 'touch' the *size_r parameter along error
return paths.
I fixed read-file and initrd-cat, and I checked that pread was
doing the right thing.
This also adds regression tests for read-file with various categories
of large file.
Diffstat (limited to 'src/guestfs.c')
0 files changed, 0 insertions, 0 deletions