staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 22 Apr 2017 10:47:23 +0000 (13:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Jun 2017 05:11:14 +0000 (07:11 +0200)
commit773fdcdc0957527577b2f1de994448894f1e3305
tree5f42642f691b251d2b63e8651c9bf418128f0525
parented13a9c6464b49b654baeba96c833b1129dc4ce4
staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data()

commit 784047eb2d3405a35087af70cba46170c5576b25 upstream.

The "len" could be as low as -14 so we should check for negatives.

Fixes: 9a7fe54ddc3a ("staging: r8188eu: Add source files for new driver - part 1")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_ap.c