aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2010-06-04 19:28:39 +0000
committermorriss <morriss@f5534014-38df-0310-8fa8-9805f1628bb7>2010-06-04 19:28:39 +0000
commitf7283aa86bca8fccba03a2e238cda0ef7d2213e6 (patch)
treecc56018278760515f9a09bf9cff8300ed21745b0
parent0302297ac475d3dc8bfa51aea7171eb1e5fe869a (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
-rw-r--r--asn1/ansi_tcap/packet-ansi_tcap-template.c2
-rw-r--r--asn1/tcap/packet-tcap-template.c16
-rw-r--r--epan/dissectors/packet-ansi_tcap.c2
-rw-r--r--epan/dissectors/packet-tcap.c16
4 files changed, 18 insertions, 18 deletions
diff --git a/asn1/ansi_tcap/packet-ansi_tcap-template.c b/asn1/ansi_tcap/packet-ansi_tcap-template.c
index ec001265d3..8ff2eaf01f 100644
--- a/asn1/ansi_tcap/packet-ansi_tcap-template.c
+++ b/asn1/ansi_tcap/packet-ansi_tcap-template.c
@@ -362,7 +362,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/asn1/tcap/packet-tcap-template.c b/asn1/tcap/packet-tcap-template.c
index 8eb6e5d1c0..aa2b2dfc8a 100644
--- a/asn1/tcap/packet-tcap-template.c
+++ b/asn1/tcap/packet-tcap-template.c
@@ -163,17 +163,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);
@@ -227,7 +227,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;
@@ -543,11 +543,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;
@@ -555,7 +555,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
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