From: Aymen Qader <qader.aymen@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Aymen Qader <qader.aymen@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: rtl8188eu: Avoid null pointer arithmetic
Date: Thu, 27 Sep 2018 18:04:08 +0100 [thread overview]
Message-ID: <20180927170408.4495-1-qader.aymen@gmail.com> (raw)
Avoid null pointer arithmetic in rtw_mlme_ext.c by skipping other field
checks if the information element pointer is null.
Signed-off-by: Aymen Qader <qader.aymen@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index 834053a0ae9d..8a3a71456cd0 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -2971,8 +2971,10 @@ static unsigned int OnAssocReq(struct adapter *padapter,
/* checking SSID */
p = rtw_get_ie(pframe + WLAN_HDR_A3_LEN + ie_offset, _SSID_IE_, &ie_len,
pkt_len - WLAN_HDR_A3_LEN - ie_offset);
- if (!p)
+ if (!p) {
status = _STATS_FAILURE_;
+ goto OnAssocReqFail;
+ }
if (ie_len == 0) { /* broadcast ssid, however it is not allowed in assocreq */
status = _STATS_FAILURE_;
--
2.17.1
next reply other threads:[~2018-09-27 17:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-27 17:04 Aymen Qader [this message]
2018-09-27 20:52 ` Larry Finger
2018-09-27 21:12 ` Aymen Qader
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180927170408.4495-1-qader.aymen@gmail.com \
--to=qader.aymen@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome