virtiofsd: validate input buffer sizes in do_write_buf()
commit0ba8c3c6fce8fe949d59c1fd84d98d220ef9e759
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 28 Feb 2019 11:25:32 +0000 (28 11:25 +0000)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Thu, 23 Jan 2020 16:41:36 +0000 (23 16:41 +0000)
tree034b45a429966259e8442aa10e721d0c395b972c
parentdad157e880416ab3a0e45beaa0e81977516568bc
virtiofsd: validate input buffer sizes in do_write_buf()

There is a small change in behavior: if fuse_write_in->size doesn't
match the input buffer size then the request is failed.  Previously
write requests with 1 fuse_buf element would truncate to
fuse_write_in->size.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Sergio Lopez <slp@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/fuse_lowlevel.c