summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-16 05:30:11 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-16 05:32:30 +0100
commite0cb0eeb3f04745cd5b17d5aa7c63ad7fea988f0 (patch)
treee2ece4f2508860b99e9192ae6fc6083edb374210
parent8a5d60b996f0c653787baa9954a8b3d57f542324 (diff)
auth_milenage: fix check against too large ind
To ensure that the IND index appended to SEQ does not affect the SEQ, the check should read '>= seq_1', not '>'. Change-Id: Ib1251159eee02aa07fae1b429ffec2e4604bf6a8
-rw-r--r--src/gsm/auth_milenage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsm/auth_milenage.c b/src/gsm/auth_milenage.c
index f151c5e8..c1331b5b 100644
--- a/src/gsm/auth_milenage.c
+++ b/src/gsm/auth_milenage.c
@@ -94,7 +94,7 @@ static int milenage_gen_vec(struct osmo_auth_vector *vec,
ind_mask = ~(seq_1 - 1);
/* the ind index must not affect the SEQ part */
- if (aud->u.umts.ind > seq_1)
+ if (aud->u.umts.ind >= seq_1)
return -3;
/* keep the incremented SQN local until gsm_milenage() succeeded. */