Commit 528025e9 authored by Robert Schmidt's avatar Robert Schmidt

Fix decoding of Mobile identity

parent 342ea088
......@@ -54,8 +54,8 @@ int decode_5gs_mobile_identity(FGSMobileIdentity *fgsmobileidentity, uint8_t iei
decoded++;
}
ielen = *(buffer + decoded);
decoded++;
ielen = *(uint16_t*)(buffer + decoded); /* length is two bytes */
decoded += 2;
CHECK_LENGTH_DECODER(len - decoded, ielen);
uint8_t typeofidentity = *(buffer + decoded) & 0x7;
......@@ -63,6 +63,8 @@ int decode_5gs_mobile_identity(FGSMobileIdentity *fgsmobileidentity, uint8_t iei
if (typeofidentity == FGS_MOBILE_IDENTITY_5G_GUTI) {
decoded_rc = decode_guti_5gs_mobile_identity(&fgsmobileidentity->guti,
buffer + decoded);
} else {
AssertFatal(false, "Mobile Identity encoding of type %d not implemented\n", typeofidentity);
}
if (decoded_rc < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment