diff options
author | Evan Huus <eapache@gmail.com> | 2014-06-20 17:36:59 -0700 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2014-06-21 04:01:52 +0000 |
commit | 37b903d7abab78a6f13b61feb88f62f2fa638151 (patch) | |
tree | cc35bbf35e846d55bf7c03936d5e43329f7b642a /asn1/pkcs12 | |
parent | 3773a7561c79e3545fca664c2a25cf2312de0ada (diff) |
batch of tvb-length conversions
Change-Id: I76ca4d075756e3ac691070e0c05344a410ea2498
Reviewed-on: https://code.wireshark.org/review/2507
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'asn1/pkcs12')
-rw-r--r-- | asn1/pkcs12/packet-pkcs12-template.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/asn1/pkcs12/packet-pkcs12-template.c b/asn1/pkcs12/packet-pkcs12-template.c index 690ac6c36b..103252e1e2 100644 --- a/asn1/pkcs12/packet-pkcs12-template.c +++ b/asn1/pkcs12/packet-pkcs12-template.c @@ -112,7 +112,7 @@ generate_key_or_iv(unsigned int id, tvbuff_t *salt_tvb, unsigned int iter, cur_keylen = 0; - salt_size = tvb_length(salt_tvb); + salt_size = tvb_captured_length(salt_tvb); salt_p = (char *)tvb_memdup(wmem_packet_scope(), salt_tvb, 0, salt_size); if (pw == NULL) @@ -313,7 +313,7 @@ int PBE_decrypt_data(const char *object_identifier_id_param, tvbuff_t *encrypted } } - datalen = tvb_length(encrypted_tvb); + datalen = tvb_captured_length(encrypted_tvb); clear_data = (char *)g_malloc(datalen); err = gcry_cipher_decrypt (cipher, clear_data, datalen, (char *)tvb_memdup(wmem_packet_scope(), encrypted_tvb, 0, datalen), datalen); |