From 9861c122dd50386f4b48bb65162f0a38f6d28785 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 12 Oct 2015 10:43:17 +0200 Subject: sgsn: Fix pattern for too long msisdn We don't care how many bytes the length has but the destination we want to copy to. Fixes: CID#1296813 --- openbsc/src/gprs/sgsn_libgtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbsc/src/gprs/sgsn_libgtp.c b/openbsc/src/gprs/sgsn_libgtp.c index 6aa12b27c..aff2f91a1 100644 --- a/openbsc/src/gprs/sgsn_libgtp.c +++ b/openbsc/src/gprs/sgsn_libgtp.c @@ -162,7 +162,7 @@ struct sgsn_pdp_ctx *sgsn_create_pdp_ctx(struct sgsn_ggsn_ctx *ggsn, if (mmctx->subscr) { pdp->msisdn.l = mmctx->subscr->sgsn_data->msisdn_len; if (pdp->msisdn.l > sizeof(pdp->msisdn.v)) - pdp->msisdn.l = sizeof(pdp->msisdn.l); + pdp->msisdn.l = sizeof(pdp->msisdn.v); memcpy(pdp->msisdn.v, mmctx->subscr->sgsn_data->msisdn, pdp->msisdn.l); } -- cgit v1.2.3