aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.c
diff options
context:
space:
mode:
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2007-01-15 05:16:13 +0000
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>2007-01-15 05:16:13 +0000
commit7a691a2473a80490cb5ceaf0bace0986b1bd8842 (patch)
tree65a493d1fa5798cb206fb7edb6ef6cdf72973b05 /epan/packet.c
parentbe64b743e8bd34cc7e24a4fb594e91d0472efa0c (diff)
instead of simply doing an assert when running out of memory in emem, throw a new OutOfMemoryError Exception, so file.c can show at least a better explanation to the user before Wireshark terminates
XXX - to prevent a busy wait, I need a portable way to wait for a short time period, like Sleep() for Windows git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20437 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/packet.c')
-rw-r--r--epan/packet.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/packet.c b/epan/packet.c
index 50f3e34cee..8b039fbe9a 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -338,6 +338,9 @@ dissect_packet(epan_dissect_t *edt, union wtap_pseudo_header *pseudo_header,
g_assert_not_reached();
}
}
+ CATCH(OutOfMemoryError) {
+ RETHROW;
+ }
ENDTRY;
fd->flags.visited = 1;
@@ -546,6 +549,9 @@ call_dissector_work(dissector_handle_t handle, tvbuff_t *tvb,
*/
ret = tvb_length(tvb);
}
+ CATCH(OutOfMemoryError) {
+ RETHROW;
+ }
ENDTRY;
col_set_writable(pinfo->cinfo, save_writable);