Always use `next_tvb` for X.25 payload

This commit is contained in:
David Perry 2022-08-04 03:23:18 +00:00 committed by A Wireshark GitLab Utility
parent 13bffe4630
commit 7238dad792
1 changed files with 3 additions and 3 deletions

View File

@ -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 */