diff options
author | Pascal Quantin <pascal.quantin@gmail.com> | 2018-02-07 18:32:50 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2018-02-07 18:31:17 +0000 |
commit | 80a1dd70295ce06d55ba1b9e7b58647c74ae77c0 (patch) | |
tree | cc104f5f1b827619bed0386966801b1188901afa /epan/dissectors/packet-ns-rpc.c | |
parent | 22824478d1bdab6b8b62c8d9a43952279abf5064 (diff) |
NSRPC: fix heuristic dissector
Do not check reported length but captured length, otherwise it can
can trigger an exception when trying to fetch at offset 4.
Once the (very basic heuristic) is verified, cann the right dissection
function.
Bug: 14399
Change-Id: Ie09d80e04f2501c940693a2ea9ecbd2f84d1e22f
Reviewed-on: https://code.wireshark.org/review/25666
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-ns-rpc.c')
-rw-r--r-- | epan/dissectors/packet-ns-rpc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/packet-ns-rpc.c b/epan/dissectors/packet-ns-rpc.c index cb3e4875b5..5dbe09a961 100644 --- a/epan/dissectors/packet-ns-rpc.c +++ b/epan/dissectors/packet-ns-rpc.c @@ -1178,7 +1178,7 @@ dissect_ns_rpc_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d { guint16 ns_rpc_sig; - if (tvb_reported_length(tvb) < 6) + if (tvb_captured_length(tvb) < 6) return FALSE; /* Get the signature */ @@ -1186,7 +1186,7 @@ dissect_ns_rpc_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* d if (ns_rpc_sig != 0xA5A5) return FALSE; - dissect_ns_rpc_heur(tvb, pinfo, tree, data); + dissect_ns_rpc(tvb, pinfo, tree, data); return TRUE; } |