diff --git a/epan/dissectors/packet-cemi.c b/epan/dissectors/packet-cemi.c index f6a29fc9a5..d20674d7d7 100644 --- a/epan/dissectors/packet-cemi.c +++ b/epan/dissectors/packet-cemi.c @@ -963,9 +963,9 @@ static const gchar* get_pid_name( gint ot, gint pid ) */ static const guint8* decrypt_data_security_data_with_key( const guint8* key, const guint8* encrypted, gint encrypted_size, const guint8* cemi, gint cemi_size ) { - guint8 ctr_0[ 16 ]; - guint8 b_0[ 16 ]; - guint8 mac[ 16 ]; + guint8 ctr_0[ KNX_KEY_LENGTH ]; + guint8 b_0[ KNX_KEY_LENGTH ]; + guint8 mac[ KNX_KEY_LENGTH ]; guint8* a_bytes = 0; const guint8* p_bytes = NULL; gint a_length = 0; diff --git a/epan/dissectors/packet-knxip.c b/epan/dissectors/packet-knxip.c index 885e29a335..8e730b8720 100644 --- a/epan/dissectors/packet-knxip.c +++ b/epan/dissectors/packet-knxip.c @@ -2585,7 +2585,7 @@ static guint8* decrypt_secure_wrapper( const guint8* key, const guint8* data, gi if( decrypted ) { /* Calculate MAC */ - guint8 mac[ 16 ]; + guint8 mac[ KNX_KEY_LENGTH ]; p_length -= 16; knxip_ccm_calc_cbc_mac( mac, key, data, a_length, decrypted, p_length, nonce, 14 ); @@ -2809,7 +2809,7 @@ static guint8 check_timer_sync_mac( const guint8* key, const guint8* data, gint { // Calculate and encrypt MAC const guint8* nonce = data + header_length; - guint8 mac[ 16 ]; + guint8 mac[ KNX_KEY_LENGTH ]; knxip_ccm_calc_cbc_mac( mac, key, data, header_length, NULL, 0, nonce, 14 ); knxip_ccm_encrypt( mac, key, NULL, 0, mac, nonce, 14 ); diff --git a/epan/dissectors/packet-knxip_decrypt.c b/epan/dissectors/packet-knxip_decrypt.c index 7b53c9c9aa..379d1792d6 100644 --- a/epan/dissectors/packet-knxip_decrypt.c +++ b/epan/dissectors/packet-knxip_decrypt.c @@ -57,7 +57,7 @@ static void build_ctr0( guint8 p_result[ KNX_KEY_LENGTH ], const guint8* nonce, } // Calculate MAC for KNX IP Security or KNX Data Security -void knx_ccm_calc_cbc_mac( guint8* p_mac, const guint8 key[ KNX_KEY_LENGTH ], +void knx_ccm_calc_cbc_mac(guint8 p_mac[ KNX_KEY_LENGTH ], const guint8 key[ KNX_KEY_LENGTH ], const guint8* a_bytes, gint a_length, const guint8* p_bytes, gint p_length, const guint8 b_0[ KNX_KEY_LENGTH ] ) { @@ -103,7 +103,7 @@ void knx_ccm_calc_cbc_mac( guint8* p_mac, const guint8 key[ KNX_KEY_LENGTH ], } // Calculate MAC for KNX IP Security, using 6-byte Sequence ID -void knxip_ccm_calc_cbc_mac( guint8* p_mac, const guint8 key[ KNX_KEY_LENGTH ], +void knxip_ccm_calc_cbc_mac( guint8 p_mac[ KNX_KEY_LENGTH ], const guint8 key[ KNX_KEY_LENGTH ], const guint8* a_bytes, gint a_length, const guint8* p_bytes, gint p_length, const guint8* nonce, guint8 nonce_length ) { @@ -183,7 +183,7 @@ guint8* knx_ccm_encrypt( guint8* p_result, const guint8 key[ KNX_KEY_LENGTH ], c // Encrypt for KNX IP Security (with 16-byte MAC and Nonce based on 6-byte Sequence ID) guint8* knxip_ccm_encrypt( guint8* p_result, const guint8 key[ KNX_KEY_LENGTH ], const guint8* p_bytes, gint p_length, - const guint8* mac, const guint8* nonce, guint8 nonce_length ) + const guint8 mac[KNX_KEY_LENGTH], const guint8* nonce, guint8 nonce_length ) { guint8 ctr_0[ KNX_KEY_LENGTH ]; build_ctr0( ctr_0, nonce, nonce_length ); diff --git a/epan/proto.c b/epan/proto.c index 2a156b8d84..cba8ef3a7f 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -10189,7 +10189,7 @@ hfinfo_number_value_format(const header_field_info *hfinfo, char buf[32], guint3 } static const char * -hfinfo_number_value_format64(const header_field_info *hfinfo, char buf[64], guint64 value) +hfinfo_number_value_format64(const header_field_info *hfinfo, char buf[48], guint64 value) { int display = hfinfo->display; @@ -10250,7 +10250,7 @@ hfinfo_numeric_value_format(const header_field_info *hfinfo, char buf[32], guint } static const char * -hfinfo_numeric_value_format64(const header_field_info *hfinfo, char buf[64], guint64 value) +hfinfo_numeric_value_format64(const header_field_info *hfinfo, char buf[48], guint64 value) { /* Get the underlying BASE_ value */ int display = FIELD_DISPLAY(hfinfo->display); @@ -10307,7 +10307,7 @@ hfinfo_number_vals_format(const header_field_info *hfinfo, char buf[32], guint32 } static const char * -hfinfo_number_vals_format64(const header_field_info *hfinfo, char buf[64], guint64 value) +hfinfo_number_vals_format64(const header_field_info *hfinfo, char buf[48], guint64 value) { /* Get the underlying BASE_ value */ int display = FIELD_DISPLAY(hfinfo->display); diff --git a/epan/reedsolomon.c b/epan/reedsolomon.c index fa94003578..1eba6e8e53 100644 --- a/epan/reedsolomon.c +++ b/epan/reedsolomon.c @@ -338,7 +338,7 @@ gen_poly(void) */ int -encode_rs(dtype data[KK], dtype bb[NN-KK]) +encode_rs(dtype data[], dtype bb[]) { register int i, j; gf feedback; @@ -406,7 +406,7 @@ encode_rs(dtype data[KK], dtype bb[NN-KK]) */ int -eras_dec_rs(dtype data[NN], int eras_pos[NN-KK], int no_eras) +eras_dec_rs(dtype data[], int eras_pos[], int no_eras) { int deg_lambda, el, deg_omega; int i, j, r,k;