xz: Avoid reading beyond EOF
commit1c96a7e6a0078000395d25708c2e4dd0a447e2b7
authorEric Blake <eblake@redhat.com>
Fri, 4 Oct 2019 02:13:24 +0000 (3 21:13 -0500)
committerEric Blake <eblake@redhat.com>
Fri, 4 Oct 2019 02:47:57 +0000 (3 21:47 -0500)
treef32d0d342ae852104130eb3c7c3d2e4776c7ab7b
parent679c72d651631f5711852b7395271da834265961
xz: Avoid reading beyond EOF

Check that the file is long enough before reading the header, rather
than violating assumptions of the backend that all requests have
already passed bounds checks.  Missed when converting from a plugin to
a filter.

Fixes: c879d310
Signed-off-by: Eric Blake <eblake@redhat.com>
filters/xz/xzfile.c