changeset 32:b76c78b62e5e

g23m-gsm/alr/alr_dedi.c: same KC_STRING_SIZE fix as in Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 15 Oct 2016 04:07:40 +0000
parents f4da114088af
children 6a2b09d3b1b4
files g23m-gsm/alr/alr_dedi.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/g23m-gsm/alr/alr_dedi.c	Sat Oct 15 04:04:27 2016 +0000
+++ b/g23m-gsm/alr/alr_dedi.c	Sat Oct 15 04:07:40 2016 +0000
@@ -923,7 +923,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));
   #ifdef FF_L23_A5_3
   dedi_cyclically_repeat_kc ((UBYTE *)&chan_ass->cipher_key, (UBYTE *)dedicated_req->ciph.kc, KLEN);
   #endif
@@ -1125,7 +1125,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));
   #ifdef FF_L23_A5_3
   dedi_cyclically_repeat_kc ((UBYTE *)&async->cipher_key, (UBYTE *)dedicated_req->ciph.kc, KLEN);
   #endif
@@ -1277,7 +1277,7 @@
                        (T_frequency_list *)&sync->handover_command.frequency_list_bef_sti);
   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));
   #ifdef FF_L23_A5_3
   dedi_cyclically_repeat_kc ((UBYTE *)&sync->cipher_key, (UBYTE *)dedicated_req->ciph.kc, KLEN);
   #endif
@@ -1402,7 +1402,7 @@
                        (T_frequency_list *)&presync->handover_command.frequency_list_bef_sti);
   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));
   #ifdef FF_L23_A5_3
   dedi_cyclically_repeat_kc ((UBYTE *)&presync->cipher_key, (UBYTE *)dedicated_req->ciph.kc, KLEN);
   #endif
@@ -1603,7 +1603,7 @@
    */
   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));
   #ifdef FF_L23_A5_3
   dedi_cyclically_repeat_kc ((UBYTE *)set_ciph->new_ciph_param.A, (UBYTE *)ciph_req->ciph.kc, KLEN);  
   #endif
@@ -1611,7 +1611,7 @@
   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));
   #ifdef FF_L23_A5_3
   dedi_cyclically_repeat_kc ((UBYTE *)&alr_data->dedi_data.act_cipher_key,
           (UBYTE *)&set_ciph->new_ciph_param, KLEN);