aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rohc.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2011-05-10 15:37:06 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2011-05-10 15:37:06 +0000
commit24644ea58a38df16e97bbc9957066d22adb35639 (patch)
treed99a6fac54ddd4db6b08e4dcf8795e75a9c78cda /epan/dissectors/packet-rohc.c
parentd88c7ff3f929b0df0bb477e2faba765f41f9d84a (diff)
Fix two cases of comparisons begin made against incorrect values following a
mask operation. Also, initialize g_rohc_info if pinfo->packet_data is !NULL. Fixes Coverity ID's 1187, 1188 and 1190. svn path=/trunk/; revision=37042
Diffstat (limited to 'epan/dissectors/packet-rohc.c')
-rw-r--r--epan/dissectors/packet-rohc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-rohc.c b/epan/dissectors/packet-rohc.c
index 22025c9eb6..bb0995f168 100644
--- a/epan/dissectors/packet-rohc.c
+++ b/epan/dissectors/packet-rohc.c
@@ -219,7 +219,7 @@ get_self_describing_var_len_val(tvbuff_t *tvb, proto_tree *tree, int offset, int
proto_tree_add_bits_item(tree, hf_rohc_var_len, tvb, bit_offset, 1, ENC_BIG_ENDIAN);
num_bits = 7;
bit_offset++;
- }else if((oct&0xc0)==0x20){
+ }else if((oct&0xc0)==0x80){
/* Two octets */
*val_len = 2;
proto_tree_add_bits_item(tree, hf_rohc_var_len, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
@@ -473,7 +473,7 @@ dissect_rohc_ir_rtp_profile_dynamic(tvbuff_t *tvb, proto_tree *tree, int offset,
}
/* Time_Stride : 1-4 octets, if TIS = 1 */
- if((oct&0x02)== 1){
+ if((oct&0x02)== 2){
/* Time_Stride encoded as
* 4.5.6. Self-describing variable-length values
*/
@@ -582,6 +582,7 @@ dissect_rohc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if(pinfo->private_data != NULL){
p_rohc_info = pinfo->private_data;
+ memset(&g_rohc_info, 0, sizeof(rohc_info));
}else{
g_rohc_info.rohc_compression = FALSE;
g_rohc_info.rohc_ip_version = g_version;