mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-09 18:59:13 +08:00
p54: fix a null pointer dereference bug
SVN-Revision: 25775
This commit is contained in:
parent
f6bd11e72d
commit
ba5bfe48c3
18
package/mac80211/patches/710-p54_rssi_crash_fix.patch
Normal file
18
package/mac80211/patches/710-p54_rssi_crash_fix.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
--- a/drivers/net/wireless/p54/eeprom.c
|
||||||
|
+++ b/drivers/net/wireless/p54/eeprom.c
|
||||||
|
@@ -524,10 +524,13 @@ err_data:
|
||||||
|
|
||||||
|
struct p54_rssi_db_entry *p54_rssi_find(struct p54_common *priv, const u16 freq)
|
||||||
|
{
|
||||||
|
- struct p54_rssi_db_entry *entry = (void *)(priv->rssi_db->data +
|
||||||
|
- priv->rssi_db->offset);
|
||||||
|
+ struct p54_rssi_db_entry *entry;
|
||||||
|
int i, found = -1;
|
||||||
|
|
||||||
|
+ if (!priv->rssi_db)
|
||||||
|
+ return &p54_rssi_default;
|
||||||
|
+
|
||||||
|
+ entry = (void *)(priv->rssi_db->data + priv->rssi_db->offset);
|
||||||
|
for (i = 0; i < priv->rssi_db->entries; i++) {
|
||||||
|
if (!same_band(freq, entry[i].freq))
|
||||||
|
continue;
|
Loading…
x
Reference in New Issue
Block a user