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
This commit is contained in:
Holger Hans Peter Freyther 2015-10-12 10:43:17 +02:00
parent fa07b489dc
commit 9861c122dd
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}