smpp: Set the column fence before dissecting the PDU

Set the fence before dissecting the PDU because if the PDU is invalid it
may throw an exception and the next PDU will clear the info about the
current PDU.

Change-Id: Ib8ad2e6e5b99c53fc75a8e55e86375a3cead1678
Reviewed-on: https://code.wireshark.org/review/36131
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Vasil Velichkov 2020-02-18 20:25:01 +02:00 committed by Anders Broman
parent c86e995aa2
commit 2c4fc32913
1 changed files with 7 additions and 2 deletions

View File

@ -2447,6 +2447,13 @@ dissect_smpp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
col_append_fstr(pinfo->cinfo, COL_INFO, ": \"%s\"", command_status_str);
}
/*
* Set the fence before dissecting the PDU because if the PDU is invalid it
* may throw an exception and the next PDU will clear the info about the
* current PDU
*/
col_set_fence(pinfo->cinfo, COL_INFO);
/*
* Dissect the PDU
*/
@ -2593,8 +2600,6 @@ dissect_smpp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
tap_rec->command_status = command_status;
tap_queue_packet(smpp_tap, pinfo, tap_rec);
col_set_fence(pinfo->cinfo, COL_INFO);
return tvb_captured_length(tvb);
}