aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gdsdb.c
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2023-05-13 21:45:16 -0400
committerJohn Thacker <johnthacker@gmail.com>2023-05-14 13:00:59 +0000
commit118815ca7c9f82c1f83f8f64d9e0e54673f31677 (patch)
tree69d21d7d856e43a38898c25ce1221b6d03a6de49 /epan/dissectors/packet-gdsdb.c
parentebbd943c8535e604dd3b29c8237ef0da49a2ae48 (diff)
GDSDB: Make sure our offset advances.
add_uint_string() returns the next offset to use, not the number of bytes consumed. So to consume all the bytes and make sure the offset advances, return the entire reported tvb length, not the number of bytes remaining. Fixup 8d3c2177793e900cfc7cfaac776a2807e4ea289f Fixes #19068
Diffstat (limited to 'epan/dissectors/packet-gdsdb.c')
-rw-r--r--epan/dissectors/packet-gdsdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gdsdb.c b/epan/dissectors/packet-gdsdb.c
index 9aefecab12..5704430995 100644
--- a/epan/dissectors/packet-gdsdb.c
+++ b/epan/dissectors/packet-gdsdb.c
@@ -480,7 +480,7 @@ static int add_uint_string(proto_tree *tree, int hf_string, tvbuff_t *tvb, int o
int ret_offset = offset + length;
if (length < 4 || ret_offset < offset) {
expert_add_info_format(NULL, ti, &ei_gdsdb_invalid_length, "Invalid length: %d", length);
- return tvb_reported_length_remaining(tvb, offset);
+ return tvb_reported_length(tvb);
}
return ret_offset;
}