]> git.proxmox.com Git - mirror_qemu.git/commit
bt: check struct sizes
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 30 Nov 2015 09:57:25 +0000 (10:57 +0100)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 4 Dec 2015 06:39:55 +0000 (09:39 +0300)
commit98475746b357f6c048caf9e001998d8a0618b2e4
treeb831590cfb972cc35dbf679c40699995278b92a3
parent2988cbeaf94203b2cf31c0b3f589aa4ebc0cff34
bt: check struct sizes

See http://permalink.gmane.org/gmane.linux.bluez.kernel/36505.  For historical
reasons these do not use sizeof, and Coverity caught a mistake in
EVT_ENCRYPT_CHANGE_SIZE.

In addition:

- remove status from create_conn_cancel_cp; the "status" field is only
in rp structs.  Note that this means that the OCF_CREATE_CONN_CANCEL
could never have worked (it would have failed the LENGTH_CHECK), but
I am keeping it anyway.

- OCF_READ_LINK_QUALITY similarly could never have worked, but I am
fixing read_link_quality_cp anyway.

- fix inquiry_info which is shorter by one: the kernel has a struct that
is 14 byte long, but not counting the initial num_responses byte which
the kernel parses separately;

- remove extended_inquiry_info altogether, since it's not used and unlike
the other inquiry structs does not have the initial num_responses byte.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
include/hw/bt.h