Skip to content
Snippets Groups Projects
Commit 182454dc authored by Peter Lieven's avatar Peter Lieven Committed by Kevin Wolf
Browse files

block/nfs: fix int overflow in nfs_client_open_qdict


nfs_client_open returns the file size in sectors. This effectively
makes it impossible to open files larger than 1TB.

Fixes: c22a0345
Cc: qemu-stable@nongnu.org
Signed-off-by: default avatarPeter Lieven <pl@kamp.de>
Message-Id: <20201209121735.16437-1-pl@kamp.de>
Reviewed-by: default avatarStefano Garzarella <sgarzare@redhat.com>
Signed-off-by: default avatarKevin Wolf <kwolf@redhat.com>
parent 9d1cc1d0
No related branches found
No related tags found
No related merge requests found
......@@ -592,7 +592,7 @@ static int64_t nfs_client_open_qdict(NFSClient *client, QDict *options,
int flags, int open_flags, Error **errp)
{
BlockdevOptionsNfs *opts;
int ret;
int64_t ret;
opts = nfs_options_qdict_to_qapi(options, errp);
if (opts == NULL) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment