[SGSN] LLC: only copy Kc if algorithm != GPRS_ALGO_GEA0

The caller currently has set the Kc pointer to NULL, this fix avoids
crashing at the callee.
This commit is contained in:
Harald Welte 2010-06-30 23:19:23 +02:00
parent d6f582b352
commit 3e2e159707
1 changed files with 2 additions and 1 deletions

View File

@ -776,8 +776,9 @@ int gprs_llgmm_assign(struct gprs_llc_llme *llme,
unsigned int i;
/* Update the crypto parameters */
memcpy(llme->kc, kc, sizeof(llme->kc));
llme->algo = alg;
if (alg != GPRS_ALGO_GEA0)
memcpy(llme->kc, kc, sizeof(llme->kc));
if (old_tlli == 0xffffffff && new_tlli != 0xffffffff) {
/* TLLI Assignment 8.3.1 */