projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff892ab
)
libiwinfo: fix segfaults in nl80211 hwmodelist and freqlist operations if called...
author
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 22 Jul 2011 14:49:52 +0000
(14:49 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Fri, 22 Jul 2011 14:49:52 +0000
(14:49 +0000)
contrib/package/iwinfo/src/iwinfo_nl80211.c
patch
|
blob
|
history
diff --git
a/contrib/package/iwinfo/src/iwinfo_nl80211.c
b/contrib/package/iwinfo/src/iwinfo_nl80211.c
index 5828ee98de4491ea24dc0ddecc98fb6a2682d22c..468ad9d70554aba19dff3d74a13db133ad6ef24c 100644
(file)
--- a/
contrib/package/iwinfo/src/iwinfo_nl80211.c
+++ b/
contrib/package/iwinfo/src/iwinfo_nl80211.c
@@
-1438,7
+1438,7
@@
int nl80211_get_freqlist(const char *ifname, char *buf, int *len)
if( req )
{
res = nl80211_send(req);
- if( res )
+ if( res
&& res->attr[NL80211_ATTR_WIPHY_BANDS]
)
{
nla_for_each_nested(band,
res->attr[NL80211_ATTR_WIPHY_BANDS], bands_remain)
@@
-1537,7
+1537,7
@@
int nl80211_get_hwmodelist(const char *ifname, int *buf)
if( req )
{
res = nl80211_send(req);
- if( res )
+ if( res
&& res->attr[NL80211_ATTR_WIPHY_BANDS]
)
{
nla_for_each_nested(band,
res->attr[NL80211_ATTR_WIPHY_BANDS], bands_remain)