dissect_frame() can throw a ReportedBoundsError; catch it in
dissect_packet(). svn path=/trunk/; revision=4720
This commit is contained in:
parent
04228a94a3
commit
9249d8094f
|
@ -1,7 +1,7 @@
|
||||||
/* packet.c
|
/* packet.c
|
||||||
* Routines for packet disassembly
|
* Routines for packet disassembly
|
||||||
*
|
*
|
||||||
* $Id: packet.c,v 1.57 2002/01/17 06:29:20 guy Exp $
|
* $Id: packet.c,v 1.58 2002/02/11 19:02:56 gram Exp $
|
||||||
*
|
*
|
||||||
* Ethereal - Network traffic analyzer
|
* Ethereal - Network traffic analyzer
|
||||||
* By Gerald Combs <gerald@ethereal.com>
|
* By Gerald Combs <gerald@ethereal.com>
|
||||||
|
@ -223,6 +223,14 @@ dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
|
||||||
edt->tvb = tvb_new_real_data(pd, fd->cap_len, fd->pkt_len, "Frame");
|
edt->tvb = tvb_new_real_data(pd, fd->cap_len, fd->pkt_len, "Frame");
|
||||||
/* Add this tvbuffer into the data_src list */
|
/* Add this tvbuffer into the data_src list */
|
||||||
fd->data_src = g_slist_append( fd->data_src, edt->tvb);
|
fd->data_src = g_slist_append( fd->data_src, edt->tvb);
|
||||||
|
|
||||||
|
/* Even though dissect_frame() catches all the exceptions a
|
||||||
|
* sub-dissector can throw, dissect_frame() itself may throw
|
||||||
|
* a ReportedBoundsError in bizarre cases. Thus, we catch the exception
|
||||||
|
* in this function. */
|
||||||
|
if(frame_handle != NULL)
|
||||||
|
call_dissector(frame_handle, edt->tvb, &edt->pi, edt->tree);
|
||||||
|
|
||||||
}
|
}
|
||||||
CATCH(BoundsError) {
|
CATCH(BoundsError) {
|
||||||
g_assert_not_reached();
|
g_assert_not_reached();
|
||||||
|
@ -238,9 +246,6 @@ dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
|
||||||
}
|
}
|
||||||
ENDTRY;
|
ENDTRY;
|
||||||
|
|
||||||
if(frame_handle != NULL)
|
|
||||||
call_dissector(frame_handle, edt->tvb, &edt->pi, edt->tree);
|
|
||||||
|
|
||||||
fd->flags.visited = 1;
|
fd->flags.visited = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue