From 182454dc63c66ff5a29eddd60cc987b6a1b45e7f Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Wed, 9 Dec 2020 13:17:35 +0100 Subject: 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: c22a03454544c2a08f1107c5cc8481a5574533d5 Cc: qemu-stable@nongnu.org Signed-off-by: Peter Lieven Message-Id: <20201209121735.16437-1-pl@kamp.de> Reviewed-by: Stefano Garzarella Signed-off-by: Kevin Wolf --- block/nfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block') diff --git a/block/nfs.c b/block/nfs.c index 77905f516d..8c1968bb41 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -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) { -- cgit v1.2.3