aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/file-rfc7468.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-08-18 00:33:14 -0700
committerGuy Harris <guy@alum.mit.edu>2018-08-18 07:34:35 +0000
commit6c18867896b609d803dc82cd78abbde9ba2d03a9 (patch)
tree9170b9604e1e21ab6e37fe858cea9c0ace2fd0c4 /epan/dissectors/file-rfc7468.c
parent787d61c0a4bac5136d54027aa71f249e6384b307 (diff)
If we run out of lines, stop dissecting.
Change-Id: I19cbbd0af9debff33f1382f77272aeecd54a9cd2 Reviewed-on: https://code.wireshark.org/review/29184 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/file-rfc7468.c')
-rw-r--r--epan/dissectors/file-rfc7468.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/epan/dissectors/file-rfc7468.c b/epan/dissectors/file-rfc7468.c
index 66c8022678..69dc1b3ec7 100644
--- a/epan/dissectors/file-rfc7468.c
+++ b/epan/dissectors/file-rfc7468.c
@@ -153,8 +153,8 @@ dissect_rfc7468(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
for (;;) {
linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE);
if (linelen == -1) {
- /* No complete line was found. Not an RFC 7468 file */
- break;
+ /* No complete line was found. Nothing more to do. */
+ return tvb_captured_length(tvb);
}
/*
@@ -261,8 +261,7 @@ dissect_rfc7468(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
linelen = tvb_find_line_end(tvb, offset, -1, &next_offset, FALSE);
if (linelen == -1) {
/*
- * XXX - should we just attempt to dissect what we've
- * gotten so far?
+ * No complete line was found. Nothing more to do.
*/
return tvb_captured_length(tvb);
}