* [patch 1/2] staging: ks7010: parsing bugs in ks_wlan_read_config_file()
@ 2016-06-14 11:16 Dan Carpenter
2016-06-14 12:42 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-06-14 11:16 UTC (permalink / raw)
To: kernel-janitors
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++;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch 1/2] staging: ks7010: parsing bugs in ks_wlan_read_config_file()
2016-06-14 11:16 [patch 1/2] staging: ks7010: parsing bugs in ks_wlan_read_config_file() Dan Carpenter
@ 2016-06-14 12:42 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2016-06-14 12:42 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 345 bytes --]
On Tue, Jun 14, 2016 at 02:16:30PM +0300, Dan Carpenter wrote:
> 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>
Thanks, however I have a patch very soon to be submitted which removes
the config.c file completely.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-14 12:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-14 11:16 [patch 1/2] staging: ks7010: parsing bugs in ks_wlan_read_config_file() Dan Carpenter
2016-06-14 12:42 ` Wolfram Sang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.