aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-10-12 10:43:17 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-10-12 11:06:34 +0200
commit9861c122dd50386f4b48bb65162f0a38f6d28785 (patch)
treef3ef2d172f8969df5602470b25772e7488d30156 /openbsc
parentfa07b489dc3e14579b34365c0a0f1b5d5a70138f (diff)
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
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/gprs/sgsn_libgtp.c2
1 files changed, 1 insertions, 1 deletions
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);
}