forked from osmocom/wireshark
Fix for bug 2870:
Wrap dissect_q931_cause_ie() in a save version which clears the have_valid_q931_pi semaphore. This may remain set if a malformed q931 message causes an exception. svn path=/trunk/; revision=26190
This commit is contained in:
parent
eb9dc794b2
commit
a83a87e9ca
|
@ -1200,8 +1200,8 @@ static const value_string q931_rejection_reason_vals[] = {
|
|||
{ 0x00, NULL }
|
||||
};
|
||||
|
||||
void
|
||||
dissect_q931_cause_ie(tvbuff_t *tvb, int offset, int len,
|
||||
static void
|
||||
dissect_q931_cause_ie_unsafe(tvbuff_t *tvb, int offset, int len,
|
||||
proto_tree *tree, int hf_cause_value, guint8 *cause_value)
|
||||
{
|
||||
guint8 octet;
|
||||
|
@ -1359,6 +1359,16 @@ dissect_q931_cause_ie(tvbuff_t *tvb, int offset, int len,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
dissect_q931_cause_ie(tvbuff_t *tvb, int offset, int len,
|
||||
proto_tree *tree, int hf_cause_value, guint8 *cause_value)
|
||||
{
|
||||
gboolean have_valid_q931_pi_save = have_valid_q931_pi;
|
||||
have_valid_q931_pi = FALSE;
|
||||
dissect_q931_cause_ie_unsafe(tvb, offset, len, tree, hf_cause_value, cause_value);
|
||||
have_valid_q931_pi = have_valid_q931_pi_save;
|
||||
}
|
||||
|
||||
/*
|
||||
* Dissect a Call state information element.
|
||||
*/
|
||||
|
@ -2815,7 +2825,7 @@ dissect_q931_IEs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root_tree,
|
|||
break;
|
||||
|
||||
case CS0 | Q931_IE_CAUSE:
|
||||
dissect_q931_cause_ie(tvb,
|
||||
dissect_q931_cause_ie_unsafe(tvb,
|
||||
offset + 2, info_element_len,
|
||||
ie_tree,
|
||||
hf_q931_cause_value, &dummy);
|
||||
|
|
Loading…
Reference in New Issue