forked from pool/hostap-utils
24 lines
768 B
Diff
24 lines
768 B
Diff
|
Fixed usage of uninitialised variable (bug 184410)
|
||
|
|
||
|
Index: hostap-utils-0.4.7/hostap_crypt_conf.c
|
||
|
===================================================================
|
||
|
--- hostap-utils-0.4.7.orig/hostap_crypt_conf.c
|
||
|
+++ hostap-utils-0.4.7/hostap_crypt_conf.c
|
||
|
@@ -207,13 +207,13 @@ static int show_key(const char *dev, cha
|
||
|
struct prism2_hostapd_param *param;
|
||
|
int idx, i, max_key_len;
|
||
|
|
||
|
- max_key_len = sizeof(buf) -
|
||
|
- (int) ((char *) param->u.crypt.key - (char *) param);
|
||
|
-
|
||
|
memset(buf, 0, sizeof(buf));
|
||
|
param = (struct prism2_hostapd_param *) buf;
|
||
|
param->cmd = PRISM2_GET_ENCRYPTION;
|
||
|
|
||
|
+ max_key_len = sizeof(buf) -
|
||
|
+ (int) ((char *) param->u.crypt.key - (char *) param);
|
||
|
+
|
||
|
if (macstr2addr(addr, param->sta_addr))
|
||
|
return -1;
|
||
|
param->u.crypt.idx = 0xff;
|