Review at  https://gerrit.osmocom.org/2092

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
---
M src/gsm/auth_milenage.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/92/2092/1

diff --git a/src/gsm/auth_milenage.c b/src/gsm/auth_milenage.c
index f151c5e..c1331b5 100644
--- a/src/gsm/auth_milenage.c
+++ b/src/gsm/auth_milenage.c
@@ -94,7 +94,7 @@
        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. */

-- 
To view, visit https://gerrit.osmocom.org/2092
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1251159eee02aa07fae1b429ffec2e4604bf6a8
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <[email protected]>

Reply via email to