aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-winsrepl.c
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2016-05-26 15:22:57 +0200
committerMartin Kaiser <wireshark@kaiser.cx>2016-05-30 20:50:28 +0000
commitc046ea826c946355f4f406cbb5209e39fbb89444 (patch)
tree226d51df1658f2ea66fbbdd3c60be694a0c1358c /epan/dissectors/packet-winsrepl.c
parent023da37f3bdb9eddc0fa7681554fa0a9c0b10bba (diff)
winsrepl: don't THROW() an exception from a dissector
we can simply exit, returning the number of bytes we processed delete an unnecessary cast while it at Change-Id: I77596a315fcb4c64a0ad017d2b77b702b1829144 Reviewed-on: https://code.wireshark.org/review/15625 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan/dissectors/packet-winsrepl.c')
-rw-r--r--epan/dissectors/packet-winsrepl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-winsrepl.c b/epan/dissectors/packet-winsrepl.c
index d1f366da1e..deca83b993 100644
--- a/epan/dissectors/packet-winsrepl.c
+++ b/epan/dissectors/packet-winsrepl.c
@@ -404,11 +404,11 @@ dissect_winsrepl_wins_name(tvbuff_t *winsrepl_tvb, packet_info *pinfo,
/* NAME_LEN */
name_len = tvb_get_ntohl(winsrepl_tvb, winsrepl_offset);
ti = proto_tree_add_uint(name_tree, hf_winsrepl_name_len, winsrepl_tvb, winsrepl_offset, 4, name_len);
- if ((gint) name_len < 1) {
+ winsrepl_offset += 4;
+ if (name_len == 0) {
expert_add_info(pinfo, ti, &ei_winsrepl_name_len);
- THROW(ReportedBoundsError);
+ return winsrepl_offset;
}
- winsrepl_offset += 4;
/* NAME: TODO! */
/*