]> git.ipfire.org Git - thirdparty/qemu.git/commit
nbd/server: Reject 0-length block status request
authorEric Blake <eblake@redhat.com>
Thu, 21 Jun 2018 12:49:37 +0000 (07:49 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 18 Jul 2018 16:51:25 +0000 (11:51 -0500)
commitf8b3b02933f51d3c5625b479bcbff9147b4e612e
tree70dc828598e0867a6973eeb9002604876366505a
parent78747264b96113810c1743b4019c301c4317196c
nbd/server: Reject 0-length block status request

The NBD spec says that behavior is unspecified if the client
requests 0 length for block status; but since the structured
reply is documenting as returning a non-zero length, it's
easier to just diagnose this with an EINVAL error than to
figure out what to return.

CC: qemu-stable@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180621124937.166549-1-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
(cherry picked from commit d8b20291cba6aa9bb295885a34f2b5f05d59d1b2)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
nbd/server.c