projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
363ec56
)
ar9170: fix read & write outside array bounds
author
Dan Carpenter
<
[email protected]
>
Sun, 9 Aug 2009 12:24:09 +0000
(14:24 +0200)
committer
John W. Linville
<
[email protected]
>
Mon, 10 Aug 2009 20:41:01 +0000
(16:41 -0400)
queue == __AR9170_NUM_TXQ would cause a bug on the next line.
found by Smatch ( http://repo.or.cz/w/smatch.git ).
Cc:
[email protected]
Reported-by: Dan Carpenter <
[email protected]
>
Signed-off-by: Dan Carpenter <
[email protected]
>
Signed-off-by: Christian Lamparter <
[email protected]
>
Signed-off-by: John W. Linville <
[email protected]
>
drivers/net/wireless/ath/ar9170/main.c
patch
|
blob
|
history
diff --git
a/drivers/net/wireless/ath/ar9170/main.c
b/drivers/net/wireless/ath/ar9170/main.c
index 9d38cf60a0db2bd8ee1197d99ea6854769aa7357..88c3d8573869dbfab02b3738a26fed16d38d80ee 100644
(file)
--- a/
drivers/net/wireless/ath/ar9170/main.c
+++ b/
drivers/net/wireless/ath/ar9170/main.c
@@
-1967,13
+1967,14
@@
static int ar9170_conf_tx(struct ieee80211_hw *hw, u16 queue,
int ret;
mutex_lock(&ar->mutex);
- if (
(param) && !(queue > __AR9170_NUM_TXQ)
) {
+ if (
queue < __AR9170_NUM_TXQ
) {
memcpy(&ar->edcf[ar9170_qos_hwmap[queue]],
param, sizeof(*param));
ret = ar9170_set_qos(ar);
- } else
+ } else
{
ret = -EINVAL;
+ }
mutex_unlock(&ar->mutex);
return ret;