diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-12-29 19:05:40 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-12-29 19:05:40 +0000 |
commit | b4a05bd27105ddb5cf327ba3f8274b6e9f1f46f0 (patch) | |
tree | 5325f04d3247dde40924a43ba5d222c1ea883d81 /packet-socks.c | |
parent | 3e035003682bd21d608ef183c4ec8cc0b2d0b476 (diff) | |
download | wireshark-b4a05bd27105ddb5cf327ba3f8274b6e9f1f46f0.tar.gz wireshark-b4a05bd27105ddb5cf327ba3f8274b6e9f1f46f0.tar.bz2 wireshark-b4a05bd27105ddb5cf327ba3f8274b6e9f1f46f0.zip |
Make sure the "we're in the middle of dissecting SOCKS" flag gets
cleared even if we throw an exception when dissecting the payload.
svn path=/trunk/; revision=9473
Diffstat (limited to 'packet-socks.c')
-rw-r--r-- | packet-socks.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/packet-socks.c b/packet-socks.c index 3c6023a09c..99310a9720 100644 --- a/packet-socks.c +++ b/packet-socks.c @@ -2,7 +2,7 @@ * Routines for socks versions 4 &5 packet dissection * Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com> * - * $Id: packet-socks.c,v 1.50 2003/12/04 05:57:53 gram Exp $ + * $Id: packet-socks.c,v 1.51 2003/12/29 19:05:40 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -894,6 +894,11 @@ display_ping_and_tracert(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tr +static void clear_in_socks_dissector_flag(void *dummy _U_) +{ + in_socks_dissector_flag = 0; /* avoid recursive overflow */ +} + static void call_next_dissector(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, socks_hash_entry_t *hash_info) { @@ -925,10 +930,11 @@ static void call_next_dissector(tvbuff_t *tvb, int offset, packet_info *pinfo, /* 2003-09-18 JCFoster Fixed problem with socks tunnel in socks tunnel */ in_socks_dissector_flag = 1; /* avoid recursive overflow */ + CLEANUP_PUSH(clear_in_socks_dissector_flag, NULL); decode_tcp_ports( tvb, offset, pinfo, tree, pinfo->srcport, pinfo->destport); - in_socks_dissector_flag = 0; /* avoid recursive overflow */ + CLEANUP_CALL_AND_POP; *ptr = TCP_PORT_SOCKS; } |