aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2022-11-14 07:16:52 -0500
committerJohn Thacker <johnthacker@gmail.com>2022-11-14 12:22:37 +0000
commitab27562dbc669829b69b3770a1b9b93d1085cd4e (patch)
tree63fdfb7e198fa0cc2d7a108e2cf62e8fc86f9c75
parentb7ed46288a22d4a23955d7a1171a1a5de783bc5d (diff)
Fixup fragment
Fix a fragment idiom changed in 4f3b028d941d7270710841f19800c33301baf18e Fix #18634
-rw-r--r--epan/dissectors/packet-obex.c2
-rw-r--r--epan/dissectors/packet-smb-pipe.c2
-rw-r--r--epan/dissectors/packet-smb2.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-obex.c b/epan/dissectors/packet-obex.c
index 3830e1c0f9..a759b639b9 100644
--- a/epan/dissectors/packet-obex.c
+++ b/epan/dissectors/packet-obex.c
@@ -2354,7 +2354,7 @@ dissect_obex(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
/* packet stream is guaranted to be sequence of fragments, one by one,
so find last fragment for its offset and length */
- for (frag = frag_msg->next; frag; frag = frag->next) {}
+ for (frag = frag_msg->next; frag->next; frag = frag->next) {}
frag_msg = fragment_add_check(&obex_reassembly_table,
tvb, 0, pinfo, pinfo->p2p_dir, NULL,
diff --git a/epan/dissectors/packet-smb-pipe.c b/epan/dissectors/packet-smb-pipe.c
index 8896dfe70e..a9c46af029 100644
--- a/epan/dissectors/packet-smb-pipe.c
+++ b/epan/dissectors/packet-smb-pipe.c
@@ -3326,7 +3326,7 @@ dissect_pipe_dcerpc(tvbuff_t *d_tvb, packet_info *pinfo, proto_tree *parent_tree
we might pick up from the Read/Write calls instead of
assuming we always get them in the correct order
*/
- for (fd_i = fd_head->next; fd_i; fd_i = fd_i->next) {}
+ for (fd_i = fd_head->next; fd_i->next; fd_i = fd_i->next) {}
fd_head=fragment_add_check(&dcerpc_reassembly_table,
d_tvb, 0, pinfo, fid, NULL,
fd_i->offset+fd_i->len,
diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c
index 8ec2cdd6e6..561788dfbd 100644
--- a/epan/dissectors/packet-smb2.c
+++ b/epan/dissectors/packet-smb2.c
@@ -6387,7 +6387,7 @@ dissect_file_data_smb2_pipe(tvbuff_t *raw_tvb, packet_info *pinfo, proto_tree *t
we might pick up from the Read/Write calls instead of
assuming we always get them in the correct order
*/
- for (fd_i = fd_head->next; fd_i; fd_i = fd_i->next) {}
+ for (fd_i = fd_head->next; fd_i->next; fd_i = fd_i->next) {}
fd_head = fragment_add_check(&smb2_pipe_reassembly_table,
tvb, 0, pinfo, id, NULL,
fd_i->offset+fd_i->len,