Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfa0b432 authored by Ajay Agarwal's avatar Ajay Agarwal
Browse files

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: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 0e9f6197
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment