forked from osmocom/wireshark
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>
This commit is contained in:
parent
22824478d1
commit
80a1dd7029
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue