Kevin Wolf
e39e959e89
luks: Turn invalid assertion into check
...
The .bdrv_getlength implementation of the crypto block driver asserted
that the payload offset isn't after EOF. This is an invalid assertion to
make as the image file could be corrupted. Instead, check it and return
-EIO if the file is too small for the payload offset.
Zero length images are fine, so trigger -EIO only on offset > len, not
on offset >= len as the assertion did before.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-19 12:01:24 +01:00
..
2017-06-16 07:55:00 +08:00
2018-03-19 12:01:24 +01:00
2018-03-02 18:39:07 +01:00
2017-06-26 14:54:46 +02:00
2018-02-09 13:52:16 +01:00
2018-03-13 15:38:55 -05:00
2017-11-17 13:35:59 +01:00
2017-11-17 13:35:59 +01:00
2018-03-19 12:01:24 +01:00
2018-03-09 15:17:47 +01:00
2018-03-19 12:01:24 +01:00
2017-07-11 17:44:56 +02:00
2018-02-09 13:52:16 +01:00
2018-03-13 17:05:00 -04:00
2016-10-07 14:14:06 +02:00
2017-11-17 13:35:59 +01:00
2017-12-18 17:07:02 +03:00
2018-03-09 15:17:48 +01:00
2018-03-09 15:17:47 +01:00
2018-03-13 08:06:55 -04:00
2018-03-02 18:39:07 +01:00
2018-02-09 13:52:16 +01:00
2018-03-09 15:17:47 +01:00
2017-02-21 11:39:39 +00:00
2018-03-09 15:17:47 +01:00
2018-03-19 12:01:24 +01:00
2018-03-13 15:43:48 -05:00
2018-03-13 15:43:48 -05:00
2018-03-13 15:43:48 -05:00
2018-03-09 15:17:47 +01:00
2018-03-02 18:39:07 +01:00
2018-03-02 18:39:07 +01:00
2018-03-09 15:17:47 +01:00
2018-02-09 05:05:11 +01:00
2018-03-02 13:45:50 -06:00
2018-03-09 15:17:47 +01:00
2018-02-13 17:00:00 +01:00
2018-03-09 15:17:47 +01:00
2018-03-09 15:17:47 +01:00
2018-03-09 15:17:47 +01:00
2018-03-09 15:17:47 +01:00
2018-03-09 15:17:47 +01:00
2018-03-02 18:39:07 +01:00
2018-03-09 15:17:47 +01:00
2017-07-17 11:34:11 +08:00
2017-07-17 11:34:11 +08:00
2018-03-09 15:17:47 +01:00
2018-03-09 15:17:47 +01:00
2017-07-17 11:34:11 +08:00
2018-03-02 13:45:50 -06:00
2018-03-02 18:39:07 +01:00
2018-03-09 15:17:47 +01:00
2018-02-09 13:52:16 +01:00
2018-03-13 08:06:55 -04:00
2018-02-09 13:52:16 +01:00
2018-03-09 15:17:48 +01:00
2018-03-19 12:01:24 +01:00
2018-03-02 13:45:50 -06:00
2018-03-02 18:39:07 +01:00
2018-03-19 12:01:24 +01:00
2018-03-09 15:17:47 +01:00
2016-09-23 11:42:52 +08:00
2017-08-31 12:29:07 +02:00
2018-03-09 15:17:47 +01:00
2014-12-12 15:42:22 +00:00
2018-03-09 15:17:47 +01:00
2018-03-02 18:39:07 +01:00
2018-03-02 18:39:07 +01:00
2017-05-09 09:13:51 +02:00
2017-02-21 11:39:39 +00:00
2018-03-02 13:45:50 -06:00