mirror of https://gitee.com/openkylin/linux.git
485b06aadb
Make sure to check that we have two alternate settings and at least one endpoint before accessing the second altsetting structure and dereferencing the endpoint arrays. This specifically avoids dereferencing NULL-pointers or corrupting memory when a device does not have the expected descriptors. Note that the sanity checks in stv06xx_start() and pb0100_start() are not redundant as the driver is mixing looking up altsettings by index and by number, which may not coincide. Fixes: |
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
stv06xx.c | ||
stv06xx.h | ||
stv06xx_hdcs.c | ||
stv06xx_hdcs.h | ||
stv06xx_pb0100.c | ||
stv06xx_pb0100.h | ||
stv06xx_sensor.h | ||
stv06xx_st6422.c | ||
stv06xx_st6422.h | ||
stv06xx_vv6410.c | ||
stv06xx_vv6410.h |