diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2010-06-28 14:32:17 -0700 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2010-09-09 07:17:19 -0700 |
commit | 9e00ea1aa3b9ec9a84a6825929877f58ffc5fcfd (patch) | |
tree | 4b5d00c73fc00ea1cd6a0ba5601bff2299f830ae /src/p2p/p2p_go_neg.c | |
parent | 18708aadfc95756d73f270ab47487980e76872eb (diff) | |
download | external_wpa_supplicant_8_ti-9e00ea1aa3b9ec9a84a6825929877f58ffc5fcfd.zip external_wpa_supplicant_8_ti-9e00ea1aa3b9ec9a84a6825929877f58ffc5fcfd.tar.gz external_wpa_supplicant_8_ti-9e00ea1aa3b9ec9a84a6825929877f58ffc5fcfd.tar.bz2 |
P2P: Fix country string mismatch validation off-by-one offset
0x04 was being checked from incorrect location when skipping country
code validation.
Diffstat (limited to 'src/p2p/p2p_go_neg.c')
-rw-r--r-- | src/p2p/p2p_go_neg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c index dcd5dbd..f0d8f14 100644 --- a/src/p2p/p2p_go_neg.c +++ b/src/p2p/p2p_go_neg.c @@ -54,9 +54,9 @@ int p2p_peer_channels_check(struct p2p_data *p2p, struct p2p_channels *own, return -1; os_memcpy(dev->country, pos, 3); wpa_hexdump_ascii(MSG_DEBUG, "P2P: Peer country", pos, 3); - if (pos[3] != 0x04 && os_memcmp(pos, p2p->cfg->country, 2) != 0) { + if (pos[2] != 0x04 && os_memcmp(pos, p2p->cfg->country, 2) != 0) { wpa_msg(p2p->cfg->msg_ctx, MSG_INFO, - "P2P: Mismatching country (ours=%c%c peer's=%c%c", + "P2P: Mismatching country (ours=%c%c peer's=%c%c)", p2p->cfg->country[0], p2p->cfg->country[1], pos[0], pos[1]); return -1; |