]> git.ipfire.org Git - thirdparty/iw.git/blobdiff - connect.c
connect: fix parsing of WEP keys
[thirdparty/iw.git] / connect.c
index 339fc736819fe1a18fc96b5741c9946837c475dc..4a847a11671ff550f7ee92ac34e3339d9a4938bd 100644 (file)
--- a/connect.c
+++ b/connect.c
@@ -54,13 +54,10 @@ static int iw_conn(struct nl80211_state *state,
        argv++;
        argc--;
 
-       ret = parse_keys(msg, argv, argc);
+       ret = parse_keys(msg, &argv, &argc);
        if (ret)
                return ret;
 
-       argc -= 4;
-       argv += 4;
-
        if (!argc)
                return 0;
 
@@ -228,7 +225,7 @@ static int iw_auth(struct nl80211_state *state,
        argv++;
        argc--;
 
-       return parse_keys(msg, argv, argc);
+       return parse_keys(msg, &argv, &argc);
  nla_put_failure:
        return -ENOSPC;
 }