gprs: Use imsi field instead of imei
The wrong field has been use for the field length computation. This
hadn't any impact so far, since
sizeof(ctx->imei) == sizeof(ctx->imsi)
This patch fixes the computation to use the right field.
Sponsored-by: On-Waves ehf
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index 58c5f04..fa5e82d 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -614,7 +614,7 @@
sgsn_mm_ctx_free(ictx);
}
}
- strncpy(ctx->imsi, mi_string, sizeof(ctx->imei));
+ strncpy(ctx->imsi, mi_string, sizeof(ctx->imsi));
break;
case GSM_MI_TYPE_IMEI:
strncpy(ctx->imei, mi_string, sizeof(ctx->imei));