diff options
author | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-06-04 19:28:39 +0000 |
---|---|---|
committer | morriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-06-04 19:28:39 +0000 |
commit | f7283aa86bca8fccba03a2e238cda0ef7d2213e6 (patch) | |
tree | cc56018278760515f9a09bf9cff8300ed21745b0 /epan/dissectors | |
parent | 0302297ac475d3dc8bfa51aea7171eb1e5fe869a (diff) |
tcaphash_context_t.oid is of size LENGTH_OID+1, not LENGTH_OID. Just use sizeof(tcaphash_context_t.oid) instead of LENGTH_OID so we can use that last byte. This allows us to retrieve the whole ACN when the ACN is LENGTH_OID bytes long.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@33089 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-ansi_tcap.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-tcap.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-ansi_tcap.c b/epan/dissectors/packet-ansi_tcap.c index 5c9538715e..ac44f5b78b 100644 --- a/epan/dissectors/packet-ansi_tcap.c +++ b/epan/dissectors/packet-ansi_tcap.c @@ -1360,7 +1360,7 @@ dissect_ansi_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) */ if ( p_tcap_context && cur_oid && !p_tcap_context->oid_present ) { /* Save the application context and the sub dissector */ - g_strlcpy(p_tcap_context->oid,cur_oid, LENGTH_OID); + g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid)); if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) { p_tcap_context->subdissector_handle=subdissector_handle; p_tcap_context->oid_present=TRUE; diff --git a/epan/dissectors/packet-tcap.c b/epan/dissectors/packet-tcap.c index 8dc08dfa1d..57fe1d24b4 100644 --- a/epan/dissectors/packet-tcap.c +++ b/epan/dissectors/packet-tcap.c @@ -1443,17 +1443,17 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) gboolean pc; gint tag; - /* Check if ANSI TCAP and call the ANSI TCAP dissector if that's the case + /* Check if ANSI TCAP and call the ANSI TCAP dissector if that's the case * PackageType ::= CHOICE { unidirectional [PRIVATE 1] IMPLICIT UniTransactionPDU, * queryWithPerm [PRIVATE 2] IMPLICIT TransactionPDU, * queryWithoutPerm [PRIVATE 3] IMPLICIT TransactionPDU, * response [PRIVATE 4] IMPLICIT TransactionPDU, * conversationWithPerm [PRIVATE 5] IMPLICIT TransactionPDU, * conversationWithoutPerm [PRIVATE 6] IMPLICIT TransactionPDU, - * abort [PRIVATE 22] IMPLICIT Abort + * abort [PRIVATE 22] IMPLICIT Abort * } - * - * + * + * */ get_ber_identifier(tvb, 0, &class, &pc, &tag); @@ -1507,7 +1507,7 @@ dissect_tcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) */ if ( p_tcap_context && cur_oid && !p_tcap_context->oid_present ) { /* Save the application context and the sub dissector */ - g_strlcpy(p_tcap_context->oid,cur_oid, LENGTH_OID); + g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid)); p_tcap_context->oid_present=TRUE; if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) { p_tcap_context->subdissector_handle=subdissector_handle; @@ -2139,11 +2139,11 @@ dissect_tcap_ITU_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offs if (p_tcap_context->oid_present) { /* We have already an Application Context, check if we have to fallback to a lower version */ - if ( strncmp(p_tcap_context->oid,cur_oid, LENGTH_OID)!=0) { + if ( strncmp(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid))!=0) { /* ACN, changed, Fallback to lower version * and update the subdissector (purely formal) */ - g_strlcpy(p_tcap_context->oid,cur_oid, LENGTH_OID); + g_strlcpy(p_tcap_context->oid,cur_oid, sizeof(p_tcap_context->oid)); if ( (subdissector_handle = dissector_get_string_handle(ber_oid_dissector_table, cur_oid)) ) { p_tcap_context->subdissector_handle=subdissector_handle; p_tcap_context->subdissector_present=TRUE; @@ -2151,7 +2151,7 @@ dissect_tcap_ITU_ComponentPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offs } } else { /* We do not have the OID in the TCAP context, so store it */ - g_strlcpy(p_tcap_context->oid,cur_oid, LENGTH_OID); + g_strlcpy(p_tcap_context->oid, cur_oid, sizeof(p_tcap_context->oid)); p_tcap_context->oid_present=TRUE; /* Try to find a subdissector according to OID */ if ( (subdissector_handle |