aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/tcap
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2010-06-04 19:28:39 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2010-06-04 19:28:39 +0000
commit2efec6f8c5fab5feee816f6c5d710c463a4a97da (patch)
treecc56018278760515f9a09bf9cff8300ed21745b0 /asn1/tcap
parentf6b2458924a0fef8d513642515bdd3a297fbfee0 (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.
svn path=/trunk/; revision=33089
Diffstat (limited to 'asn1/tcap')
-rw-r--r--asn1/tcap/packet-tcap-template.c16
1 files changed, 8 insertions, 8 deletions
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