hw/usb/dev-uas: Report command additional adb length as unsupported
commitd755cb9696e8aa16e850ac5f0b908015520cd395
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Wed, 20 Jan 2021 15:35:22 +0000 (20 16:35 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 22 Jan 2021 13:51:35 +0000 (22 14:51 +0100)
treeda47139612fc740db50772c060b5d51997c7e9d9
parent2e8f72acb0e948566c129d3e819cd77b9a8789ac
hw/usb/dev-uas: Report command additional adb length as unsupported

We are not ready to handle additional CDB data.

If a guest sends a packet with such additional data,
report the command parameter as not supported.

Specify a size (of 1 byte) for the add_cdb member we
are not using, to fix the following warning:

  usb/dev-uas.c:157:31: error: field 'status' with variable sized type 'uas_iu' not at the end of a struct or class is a GNU extension [-Werror,-Wgnu-variable-sized-type-not-at-end]
      uas_iu                    status;
                                ^

Reported-by: Ed Maste <emaste@FreeBSD.org>
Reported-by: Daniele Buono <dbuono@linux.vnet.ibm.com>
Reported-by: Han Han <hhan@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210120153522.1173897-4-philmd@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-uas.c