SMPP: prevent triggering an exception in the heuristic checks
Change-Id: Ic69b31914d2c5c1eaa1c30d34f946d66bbfdf6a3 Reviewed-on: https://code.wireshark.org/review/30550 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
This commit is contained in:
parent
94d2cc5b16
commit
1a390109a6
|
@ -2318,11 +2318,12 @@ huawei_sm_result_notify_resp(proto_tree *tree, tvbuff_t *tvb)
|
|||
static gboolean
|
||||
dissect_smpp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
|
||||
{
|
||||
guint command_id; /* SMPP command */
|
||||
guint command_status; /* Status code */
|
||||
guint command_length; /* length of PDU */
|
||||
guint32 command_id; /* SMPP command */
|
||||
guint32 command_status; /* Status code */
|
||||
guint32 command_length; /* length of PDU */
|
||||
|
||||
if (tvb_reported_length(tvb) < SMPP_MIN_LENGTH) /* Mandatory header */
|
||||
if (tvb_reported_length(tvb) < SMPP_MIN_LENGTH || /* Mandatory header */
|
||||
tvb_captured_length(tvb) < 12)
|
||||
return FALSE;
|
||||
command_length = tvb_get_ntohl(tvb, 0);
|
||||
if (command_length > 64 * 1024 || command_length < SMPP_MIN_LENGTH)
|
||||
|
|
Loading…
Reference in New Issue