usb: f_serial: Check port_num before allocating serial instance
Maximum number of allowed gadget serial ports is
GSERIAL_NO_PORTS = 3. There is a chance that we try
to access index >=3 of gser_port array, which is a bug.
Add this check before accessing the gser_port. If
violated, unbind the configuration.
Change-Id: I42cd2847fd2d681b4f8b614048ad54e7fe096092
Signed-off-by:
Ajay Agarwal <ajaya@codeaurora.org>
Loading
Please register or sign in to comment