summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdk-stage1/wireless.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdk-stage1/wireless.c b/mdk-stage1/wireless.c
index ba3224468..1785dbfa7 100644
--- a/mdk-stage1/wireless.c
+++ b/mdk-stage1/wireless.c
@@ -95,7 +95,7 @@ static int wireless_set_restricted_key(int socket, const char *ifname, const cha
int key_len = 0;
unsigned int tmp;
- while (sscanf(key + key_len, "%2X", &tmp) == 1)
+ while (sscanf(key + 2*key_len, "%2X", &tmp) == 1)
real_key[key_len++] = (unsigned char) tmp;
wrq.u.data.flags = IW_ENCODE_RESTRICTED;