aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-x25.c
diff options
context:
space:
mode:
authorDavid Perry <boolean263@protonmail.com>2022-08-04 03:23:18 +0000
committerA Wireshark GitLab Utility <6629907-ws-gitlab-utility@users.noreply.gitlab.com>2022-08-04 03:23:18 +0000
commit7238dad79296cbe94cb901a6d927cbe24eb92ee4 (patch)
tree84f0880f07edb37cc368326a69cb43c17281bae5 /epan/dissectors/packet-x25.c
parent13bffe4630c6bdc129ab47e3675cdf47ff62fab5 (diff)
Always use `next_tvb` for X.25 payload
Diffstat (limited to 'epan/dissectors/packet-x25.c')
-rw-r--r--epan/dissectors/packet-x25.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-x25.c b/epan/dissectors/packet-x25.c
index 68b1b9535d..55537c4715 100644
--- a/epan/dissectors/packet-x25.c
+++ b/epan/dissectors/packet-x25.c
@@ -1940,9 +1940,9 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
if (payload_check_data){
/* If the Call Req. has not been captured, let's look at the first
two bytes of the payload to see if this looks like COTP. */
- if (tvb_get_guint8(tvb, localoffset) == tvb_reported_length(next_tvb)-1) {
+ if (tvb_get_guint8(next_tvb, 0) == tvb_reported_length(next_tvb)-1) {
/* First byte contains the length of the remaining buffer */
- if ((tvb_get_guint8(tvb, localoffset+1) & 0x0F) == 0) {
+ if ((tvb_get_guint8(next_tvb, 1) & 0x0F) == 0) {
/* Second byte contains a valid COTP TPDU */
if (!pinfo->fd->visited)
x25_hash_add_proto_start(vc, pinfo->num, ositp_handle);
@@ -1953,7 +1953,7 @@ dissect_x25_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Then let's look at the first byte of the payload to see if this
looks like IP or CLNP. */
- switch (tvb_get_guint8(tvb, localoffset)) {
+ switch (tvb_get_guint8(next_tvb, 0)) {
case 0x45:
/* Looks like an IP header */