From 74a5f50c806c557ee8412d3f0c0f8120e41153f3 Mon Sep 17 00:00:00 2001 From: Martin Mathieson Date: Sat, 27 Jun 2015 16:46:44 +0100 Subject: ipsec: correct some format specifiers Change-Id: I340ab6186d5d5d9c5d0fa301a1b1e5824932d547 Reviewed-on: https://code.wireshark.org/review/9192 Petri-Dish: Martin Mathieson Reviewed-by: Martin Mathieson --- epan/dissectors/packet-ipsec.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'epan/dissectors/packet-ipsec.c') diff --git a/epan/dissectors/packet-ipsec.c b/epan/dissectors/packet-ipsec.c index d87abd9f41..b7cfac4bea 100644 --- a/epan/dissectors/packet-ipsec.c +++ b/epan/dissectors/packet-ipsec.c @@ -440,7 +440,7 @@ void esp_sa_record_add_from_dissector(guint8 protocol, const gchar *srcIP, const } else { /* No room left!! */ - fprintf(stderr, " Failed to add UE as already have max (%u) configured\n", + fprintf(stderr, " Failed to add UE as already have max (%d) configured\n", MAX_EXTRA_SA_RECORDS); return; } @@ -1691,7 +1691,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (esp_crypt_key_len != gcry_cipher_get_algo_keylen (crypt_algo_libgcrypt)) { - fprintf (stderr, " Error in Encryption Algorithm 3DES-CBC : Bad Keylen (got %i Bits, need %lu)\n", + fprintf (stderr, " Error in Encryption Algorithm 3DES-CBC : Bad Keylen (got %u Bits, need %lu)\n", esp_crypt_key_len * 8, (unsigned long) gcry_cipher_get_algo_keylen (crypt_algo_libgcrypt) * 8); decrypt_ok = FALSE; @@ -1742,7 +1742,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; default: - fprintf (stderr, " Error in Encryption Algorithm AES-CBC : Bad Keylen (%i Bits)\n", + fprintf (stderr, " Error in Encryption Algorithm AES-CBC : Bad Keylen (%u Bits)\n", esp_crypt_key_len * 8); decrypt_ok = FALSE; } @@ -1779,7 +1779,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) decrypt_using_libgcrypt = TRUE; break; default: - fprintf (stderr, " Error in Encryption Algorithm CAST5-CBC : Bad Keylen (%i Bits)\n", + fprintf (stderr, " Error in Encryption Algorithm CAST5-CBC : Bad Keylen (%u Bits)\n", esp_crypt_key_len * 8); decrypt_ok = FALSE; } @@ -1811,7 +1811,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (esp_crypt_key_len != gcry_cipher_get_algo_keylen (crypt_algo_libgcrypt)) { - fprintf (stderr, " Error in Encryption Algorithm DES-CBC : Bad Keylen (%i Bits, need %lu)\n", + fprintf (stderr, " Error in Encryption Algorithm DES-CBC : Bad Keylen (%u Bits, need %lu)\n", esp_crypt_key_len * 8, (unsigned long) gcry_cipher_get_algo_keylen (crypt_algo_libgcrypt) * 8); decrypt_ok = FALSE; } @@ -1863,7 +1863,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; default: - fprintf (stderr, " Error in Encryption Algorithm AES-CTR / AES-GCM : Bad Keylen (%i Bits)\n", + fprintf (stderr, " Error in Encryption Algorithm AES-CTR / AES-GCM : Bad Keylen (%u Bits)\n", esp_crypt_key_len * 8); decrypt_ok = FALSE; } @@ -1905,7 +1905,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) break; default: - fprintf (stderr, " Error in Encryption Algorithm TWOFISH-CBC : Bad Keylen (%i Bits)\n", + fprintf (stderr, " Error in Encryption Algorithm TWOFISH-CBC : Bad Keylen (%u Bits)\n", esp_crypt_key_len * 8); decrypt_ok = FALSE; } @@ -1940,7 +1940,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (esp_crypt_key_len != gcry_cipher_get_algo_keylen (crypt_algo_libgcrypt)) { - fprintf (stderr, " Error in Encryption Algorithm BLOWFISH-CBC : Bad Keylen (%i Bits, need %lu)\n", + fprintf (stderr, " Error in Encryption Algorithm BLOWFISH-CBC : Bad Keylen (%u Bits, need %lu)\n", esp_crypt_key_len * 8, (unsigned long) gcry_cipher_get_algo_keylen (crypt_algo_libgcrypt) * 8); decrypt_ok = FALSE; } @@ -2000,7 +2000,7 @@ dissect_esp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (err) { - fprintf(stderr, " Error in Algorithm %s Mode %d, gcry_cipher_setkey(key_len=%d) failed: %s\n", + fprintf(stderr, " Error in Algorithm %s Mode %d, gcry_cipher_setkey(key_len=%u) failed: %s\n", gcry_cipher_algo_name(crypt_algo_libgcrypt), crypt_mode_libgcrypt, esp_crypt_key_len, gpg_strerror (err)); gcry_cipher_close(*cipher_hd); g_free(decrypted_data); -- cgit v1.2.3