aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fcels.c
diff options
context:
space:
mode:
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-08-09 10:50:30 +0000
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>2009-08-09 10:50:30 +0000
commitc1fea16295c26c0a936da00c6dc5a2695c1541d2 (patch)
tree516b9076c7d9f0d73512fa1492f6ff873266bd4e /epan/dissectors/packet-fcels.c
parentac463d2697d3beb50fd24bbf48f818724f5220f6 (diff)
Don't use DISSECTOR_ASSERT to check source/destination address type.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3825 svn path=/trunk/; revision=29347
Diffstat (limited to 'epan/dissectors/packet-fcels.c')
-rw-r--r--epan/dissectors/packet-fcels.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/epan/dissectors/packet-fcels.c b/epan/dissectors/packet-fcels.c
index 0ac89817ce..e7ea11e1f0 100644
--- a/epan/dissectors/packet-fcels.c
+++ b/epan/dissectors/packet-fcels.c
@@ -50,6 +50,7 @@
#include <epan/emem.h>
#include <epan/conversation.h>
#include <epan/etypes.h>
+#include <epan/expert.h>
#include "packet-scsi.h"
#include "packet-fc.h"
#include "packet-fcels.h"
@@ -1922,7 +1923,13 @@ dissect_fcels (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
const guint8 *srcfc;
/* Check that the source address is, in fact, an FC address */
- DISSECTOR_ASSERT(pinfo->src.type == AT_FC);
+ if (pinfo->src.type != AT_FC) {
+ expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_WARN,
+ "Unknown source address type: %u",
+ pinfo->src.type);
+ return;
+ }
+
srcfc = pinfo->src.data;
if (srcfc[2]) {
/* If it is a loop port, we'll need to remember the ALPA */
@@ -1980,7 +1987,13 @@ dissect_fcels (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
const guint8 *dstfc;
/* Check that the source address is, in fact, an FC address */
- DISSECTOR_ASSERT(pinfo->dst.type == AT_FC);
+ if (pinfo->dst.type != AT_FC) {
+ expert_add_info_format(pinfo, ti, PI_MALFORMED, PI_WARN,
+ "Unknown destination address type: %u",
+ pinfo->dst.type);
+ return;
+ }
+
dstfc = pinfo->dst.data;
addrdata[0] = addrdata[1] = 0;