From: Jo-Philipp Wich Date: Mon, 10 Aug 2009 00:38:02 +0000 (+0000) Subject: libs/iwinfo: forgot to clear string buffer in wrapper function X-Git-Tag: 0.10.0~1213 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a85dd8ee6e2cfb83c0e602ec0f0b86e3a0b37298;p=oweals%2Fluci.git libs/iwinfo: forgot to clear string buffer in wrapper function --- diff --git a/libs/iwinfo/src/include/broadcom.h b/libs/iwinfo/src/include/broadcom.h index 344c1206a..ad3b5ddb1 100644 --- a/libs/iwinfo/src/include/broadcom.h +++ b/libs/iwinfo/src/include/broadcom.h @@ -14,8 +14,8 @@ * */ -#ifndef _wlioctl_h_ -#define _wlioctl_h_ +#ifndef _BROADCOM_H +#define _BROADCOM_H #define WL_MCSSET_LEN 16 #define WL_MAX_STA_COUNT 32 @@ -73,4 +73,4 @@ typedef struct wl_ioctl { uint32_t needed; /* bytes needed (optional) */ } wl_ioctl_t; -#endif /* _wlioctl_h_ */ +#endif diff --git a/libs/iwinfo/src/include/madwifi.h b/libs/iwinfo/src/include/madwifi.h index c1eeca775..fd19dbf61 100644 --- a/libs/iwinfo/src/include/madwifi.h +++ b/libs/iwinfo/src/include/madwifi.h @@ -18,6 +18,8 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef _MADWIFI_H +#define _MADWIFI_H /* ieee80211.h */ #define IEEE80211_ADDR_LEN 6 @@ -118,3 +120,4 @@ struct ieee80211req_sta_info { u_int8_t isi_opmode; /* sta operating mode */ }; +#endif diff --git a/libs/iwinfo/src/iwinfo_lualib.h b/libs/iwinfo/src/iwinfo_lualib.h index 410a084f3..9840466f0 100644 --- a/libs/iwinfo/src/iwinfo_lualib.h +++ b/libs/iwinfo/src/iwinfo_lualib.h @@ -51,6 +51,7 @@ { \ const char *ifname = luaL_checkstring(L, 1); \ char rv[IWINFO_BUFSIZE]; \ + memset(rv, 0, IWINFO_BUFSIZE); \ if( !type##_get_##op(ifname, rv) ) \ lua_pushstring(L, rv); \ else \