offset: Better handling of parameters
The man page claims both offset and range are optional (matching the
code), but the --help text claims offset is mandatory, and the comment
to the no-op offset_config_complete claims we require both parameters.
We did not check for an offset larger than the underlying size when
there was no range, and even when there is a range, we were not
careful about integer overflow (offset=5E range=5E happily claims to
export a 5E image; but all bets are off if you later try to access
beyond the real underlying size). And in several cases, such as if
the plugin's get_size fails but range was not provided, we are not
returning -1 for failure.
Fixes:
3db69f56
Signed-off-by: Eric Blake <eblake@redhat.com>