From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [patch 1/2] staging: ks7010: parsing bugs in ks_wlan_read_config_file()
Date: Tue, 14 Jun 2016 11:16:30 +0000 [thread overview]
Message-ID: <20160614111630.GA25457@mwanda> (raw)
The check for the NUL terminator is wrong so it looks like this could
read beyond the end of the buffer.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/staging/ks7010/ks7010_config.c b/drivers/staging/ks7010/ks7010_config.c
index 4b495cb..fb90012 100644
--- a/drivers/staging/ks7010/ks7010_config.c
+++ b/drivers/staging/ks7010/ks7010_config.c
@@ -358,7 +358,7 @@ int ks_wlan_read_config_file(struct ks_wlan_private *priv)
break;
wk_p++;
for (j = 0; *wk_p != '"'; j++) {
- if (wk_p = '\0') {
+ if (*wk_p = '\0') {
break;
}
priv->reg.ssid.body[j] = *wk_p++;
@@ -443,7 +443,7 @@ int ks_wlan_read_config_file(struct ks_wlan_private *priv)
break;
wk_p++;
for (j = 0; *wk_p != '"'; j++) {
- if (wk_p = '\0') {
+ if (*wk_p = '\0') {
break;
}
priv->reg.rom_file[j] = *wk_p++;
next reply other threads:[~2016-06-14 11:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 11:16 Dan Carpenter [this message]
2016-06-14 12:42 ` [patch 1/2] staging: ks7010: parsing bugs in ks_wlan_read_config_file() Wolfram Sang
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=20160614111630.GA25457@mwanda \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@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