# HG changeset patch # User Mychaela Falconia # Date 1476500376 0 # Node ID 4d622fd5e7011bd52deecd6f38171af6f963d062 # Parent 7fef2fc6e002c8911b83b791b7b29d1e230a1f66 src/aci2/alr/alr_dedi.c: hopefully last A5/3 bug fixed, AMR works now! diff -r 7fef2fc6e002 -r 4d622fd5e701 src/aci2/alr/alr_dedi.c --- a/src/aci2/alr/alr_dedi.c Fri Oct 14 21:55:19 2016 +0000 +++ b/src/aci2/alr/alr_dedi.c Sat Oct 15 02:59:36 2016 +0000 @@ -885,7 +885,7 @@ } chan_ass->cipher_mode = dedicated_req->ciph.stat; chan_ass->a5_algorithm = dedicated_req->ciph.algo; - memcpy (&chan_ass->cipher_key, dedicated_req->ciph.kc, KC_STRING_SIZE); + memcpy (&chan_ass->cipher_key, dedicated_req->ciph.kc, sizeof(T_cipher_key)); chan_ass->dtx_allowed = dedicated_req->tr_para.dtx; /* @@ -1104,7 +1104,7 @@ } async->handover_command.cipher_mode = dedicated_req->ciph.stat; async->handover_command.a5_algorithm = dedicated_req->ciph.algo; - memcpy (&async->cipher_key, dedicated_req->ciph.kc, KC_STRING_SIZE); + memcpy (&async->cipher_key, dedicated_req->ciph.kc, sizeof(T_cipher_key)); /* * store the new parameters as temporary configuration. @@ -1308,7 +1308,7 @@ } sync->handover_command.cipher_mode = dedicated_req->ciph.stat; sync->handover_command.a5_algorithm = dedicated_req->ciph.algo; - memcpy (&sync->cipher_key, dedicated_req->ciph.kc, KC_STRING_SIZE); + memcpy (&sync->cipher_key, dedicated_req->ciph.kc, sizeof(T_cipher_key)); /* * store the new values as temporary configuration @@ -1483,7 +1483,7 @@ } presync->handover_command.cipher_mode = dedicated_req->ciph.stat; presync->handover_command.a5_algorithm = dedicated_req->ciph.algo; - memcpy (&presync->cipher_key, dedicated_req->ciph.kc, KC_STRING_SIZE); + memcpy (&presync->cipher_key, dedicated_req->ciph.kc, sizeof(T_cipher_key)); /* * store the new parameters as temporary configuration. @@ -1691,12 +1691,12 @@ */ set_ciph->cipher_mode = ciph_req->ciph.stat; set_ciph->a5_algorithm = ciph_req->ciph.algo; - memcpy (set_ciph->new_ciph_param.A, ciph_req->ciph.kc, KC_STRING_SIZE); + memcpy (set_ciph->new_ciph_param.A, ciph_req->ciph.kc, sizeof(T_cipher_key)); alr_data->dedi_data.act_cipher_mode = set_ciph->cipher_mode; alr_data->dedi_data.act_a5_algorithm = set_ciph->a5_algorithm; memcpy (&alr_data->dedi_data.act_cipher_key, - &set_ciph->new_ciph_param, KC_STRING_SIZE); + &set_ciph->new_ciph_param, sizeof(T_cipher_key)); /* * forward the parameters to layer 1