commit | a576d7fea68be666b2a0d2104ddf936d587e65de | [log] [tgz] |
---|---|---|
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | Thu Mar 29 10:48:28 2018 -0500 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Tue Apr 24 09:34:09 2018 +0200 |
tree | a55958e26d2000b0df0af4ca0dae434b90e636f0 | |
parent | 75e6359a1be39ae7cc964603a112f38b9110655a [diff] |
usb: musb: gadget: misplaced out of bounds check commit af6f8529098aeb0e56a68671b450cf74e7a64fcd upstream. musb->endpoints[] has array size MUSB_C_NUM_EPS. We must check array bounds before accessing the array and not afterwards. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Bin Liu <b-liu@ti.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>