summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libwpactrl/wpactrl_networks_parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libwpactrl/wpactrl_networks_parse.c b/src/libwpactrl/wpactrl_networks_parse.c
index 444941a..1f7f0e9 100644
--- a/src/libwpactrl/wpactrl_networks_parse.c
+++ b/src/libwpactrl/wpactrl_networks_parse.c
@@ -22,13 +22,13 @@ static int wpactrl_networks_parse_one (char const *s, size_t len, wpactrl_networ
pos = byte_rchr(s, len, '\t') ;
if (!pos || pos >= len) goto eproto ;
sr.flags_start = sa->len ;
- if (wpactrl_flags_scan(s + pos + 1, sa) != pos) goto eproto ;
+ if (wpactrl_flags_scan(s + pos + 1, sa) != len - pos - 1) goto eproto ;
sr.flags_len = sa->len - sr.flags_start ;
len = pos ;
pos = byte_rchr(s, len - 1, '\t') ;
if (!pos || pos >= len - 1) goto eproto ;
- if (wpactrl_bssid_scan(s + pos + 1, sr.bssid) != len - 1) goto eproto ;
+ if (wpactrl_bssid_scan(s + pos + 1, sr.bssid) != len - pos - 1) goto eproto ;
len = pos ;
sr.ssid_start = sa->len ;