diff options
author | João Valverde <j@v6e.pt> | 2021-12-18 18:48:20 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2021-12-19 21:21:58 +0000 |
commit | 0ccd69e530ed18ac19a4484c76bdbef94d1ab2b1 (patch) | |
tree | ffb5f202b47fbead8ff87e573afd72c856c91ae0 /epan/dissectors/packet-isakmp.c | |
parent | f984def50cfb20c5a47f7ac41b7b72bd270f2bb7 (diff) |
Replace g_strdup_printf() with ws_strdup_printf()
Use macros from inttypes.h.
Diffstat (limited to 'epan/dissectors/packet-isakmp.c')
-rw-r--r-- | epan/dissectors/packet-isakmp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c index a66224a1a7..2aae7c0e14 100644 --- a/epan/dissectors/packet-isakmp.c +++ b/epan/dissectors/packet-isakmp.c @@ -6292,7 +6292,7 @@ static gboolean ikev1_uat_data_update_cb(void* p, char** err) { ikev1_uat_data_key_t *ud = (ikev1_uat_data_key_t *)p; if (ud->icookie_len != COOKIE_SIZE) { - *err = g_strdup_printf("Length of Initiator's COOKIE must be %d octets (%d hex characters).", COOKIE_SIZE, COOKIE_SIZE * 2); + *err = ws_strdup_printf("Length of Initiator's COOKIE must be %d octets (%d hex characters).", COOKIE_SIZE, COOKIE_SIZE * 2); return FALSE; } @@ -6302,7 +6302,7 @@ static gboolean ikev1_uat_data_update_cb(void* p, char** err) { } if (ud->key_len > MAX_KEY_SIZE) { - *err = g_strdup_printf("Length of Encryption key limited to %d octets (%d hex characters).", MAX_KEY_SIZE, MAX_KEY_SIZE * 2); + *err = ws_strdup_printf("Length of Encryption key limited to %d octets (%d hex characters).", MAX_KEY_SIZE, MAX_KEY_SIZE * 2); return FALSE; } @@ -6377,12 +6377,12 @@ static gboolean ikev2_uat_data_update_cb(void* p, char** err) { ikev2_uat_data_t *ud = (ikev2_uat_data_t *)p; if (ud->key.spii_len != COOKIE_SIZE) { - *err = g_strdup_printf("Length of Initiator's SPI must be %d octets (%d hex characters).", COOKIE_SIZE, COOKIE_SIZE * 2); + *err = ws_strdup_printf("Length of Initiator's SPI must be %d octets (%d hex characters).", COOKIE_SIZE, COOKIE_SIZE * 2); return FALSE; } if (ud->key.spir_len != COOKIE_SIZE) { - *err = g_strdup_printf("Length of Responder's SPI must be %d octets (%d hex characters).", COOKIE_SIZE, COOKIE_SIZE * 2); + *err = ws_strdup_printf("Length of Responder's SPI must be %d octets (%d hex characters).", COOKIE_SIZE, COOKIE_SIZE * 2); return FALSE; } @@ -6395,31 +6395,31 @@ static gboolean ikev2_uat_data_update_cb(void* p, char** err) { } if (ud->encr_spec->icv_len && ud->auth_spec->number != IKEV2_AUTH_NONE) { - *err = g_strdup_printf("Selected encryption_algorithm %s requires selecting NONE integrity algorithm.", + *err = ws_strdup_printf("Selected encryption_algorithm %s requires selecting NONE integrity algorithm.", val_to_str(ud->encr_spec->number, vs_ikev2_encr_algs, "other-%d")); return FALSE; } if (ud->sk_ei_len != ud->encr_spec->key_len) { - *err = g_strdup_printf("Length of SK_ei (%u octets) does not match the key length (%u octets) of the selected encryption algorithm.", + *err = ws_strdup_printf("Length of SK_ei (%u octets) does not match the key length (%u octets) of the selected encryption algorithm.", ud->sk_ei_len, ud->encr_spec->key_len); return FALSE; } if (ud->sk_er_len != ud->encr_spec->key_len) { - *err = g_strdup_printf("Length of SK_er (%u octets) does not match the key length (%u octets) of the selected encryption algorithm.", + *err = ws_strdup_printf("Length of SK_er (%u octets) does not match the key length (%u octets) of the selected encryption algorithm.", ud->sk_er_len, ud->encr_spec->key_len); return FALSE; } if (ud->sk_ai_len != ud->auth_spec->key_len) { - *err = g_strdup_printf("Length of SK_ai (%u octets) does not match the key length (%u octets) of the selected integrity algorithm.", + *err = ws_strdup_printf("Length of SK_ai (%u octets) does not match the key length (%u octets) of the selected integrity algorithm.", ud->sk_ai_len, ud->auth_spec->key_len); return FALSE; } if (ud->sk_ar_len != ud->auth_spec->key_len) { - *err = g_strdup_printf("Length of SK_ar (%u octets) does not match the key length (%u octets) of the selected integrity algorithm.", + *err = ws_strdup_printf("Length of SK_ar (%u octets) does not match the key length (%u octets) of the selected integrity algorithm.", ud->sk_ar_len, ud->auth_spec->key_len); return FALSE; } |