diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2006-03-10 22:01:10 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2006-03-10 22:01:10 +0000 |
commit | 4e1ca8f2c3892d6cb949344b20a3e84e021c7ec2 (patch) | |
tree | 634ebb44840e760472b7c6bf7639f81614ca41c7 /asn1/h248/h248.cnf | |
parent | 8b22411809445d94ce0ff9bf2b78c52c046d62f1 (diff) | |
download | wireshark-4e1ca8f2c3892d6cb949344b20a3e84e021c7ec2.tar.gz |
fix coverity CIDs 113 and 114.
while at it change the h248 context analysis to use se_trees instead of GHashTables
svn path=/trunk/; revision=17571
Diffstat (limited to 'asn1/h248/h248.cnf')
-rw-r--r-- | asn1/h248/h248.cnf | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf index bd561c7d9a..a6aee5dd28 100644 --- a/asn1/h248/h248.cnf +++ b/asn1/h248/h248.cnf @@ -268,18 +268,24 @@ ServiceChangeReply/terminationID terminationIDList tvbuff_t* new_tvb; offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index, &new_tvb); - term->len = tvb_length(new_tvb); - term->type = 0; /* unknown */ - - if (term->len) { - term->buffer = ep_tvb_memdup(new_tvb,0,term->len); - term->str = bytes_to_str(term->buffer,term->len); - } - - term = h248_cmd_add_term(msg, trx, cmd, term, wild_term); - - if (new_tvb && h248_term_handle) { - call_dissector(h248_term_handle, new_tvb, pinfo, tree); + if (new_tvb) { + term->len = tvb_length(new_tvb); + term->type = 0; /* unknown */ + + if (term->len) { + term->buffer = ep_tvb_memdup(new_tvb,0,term->len); + term->str = bytes_to_str(term->buffer,term->len); + } + + term = h248_cmd_add_term(msg, trx, cmd, term, wild_term); + + if (h248_term_handle) { + call_dissector(h248_term_handle, new_tvb, pinfo, tree); + } + } else { + term->len = 0; + term->buffer = (guint8*)ep_strdup(""); + term->str = ep_strdup("?"); } #.END |