cdc-acm: fix uninitialized variable
commitb9d031f354dac940ff98c6df31f4b5864de7a33d
authorOliver Neukum <oneukum@suse.com>
Wed, 2 Nov 2016 13:42:52 +0000 (2 14:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Nov 2016 09:51:47 +0000 (18 10:51 +0100)
tree08757402820e57a95b9b2122c59fc0133d2be011
parentc480880cd12c498c2b0fe859ca0a5b0b6f4f6ff1
cdc-acm: fix uninitialized variable

commit 7309aa847ead3fa561663b16779a0dde8c64cc7c upstream.

variable struct usb_cdc_parsed_header h may be used
uninitialized in acm_probe.

In kernel 4.8.

    /* handle quirks deadly to normal probing*/
    if (quirks == NO_UNION_NORMAL)

        ...

        goto skip_normal_probe;
    }

we bypass call to

    cdc_parse_cdc_header(&h, intf, buffer, buflen);

but later use h in

    if (h.usb_cdc_country_functional_desc) { /* export the country data */

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Reported-by: Victor Sologoubov <victor0@rambler.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-acm.c