aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Albertson <kevin.eric.albertson@gmail.com>2022-12-22 20:52:18 -0500
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2022-12-28 05:00:45 +0000
commit0ea91fc6fa9caa3c683c2512dd02a55363539852 (patch)
tree545b1b7619331980d78d7dd7d384ee2b4a97b821
parenta9037f45c737dd9893493a6f895106078f7c9107 (diff)
error on extra data
-rw-r--r--epan/tvbuff_zstd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/tvbuff_zstd.c b/epan/tvbuff_zstd.c
index 916ac7edf3..ced3daac46 100644
--- a/epan/tvbuff_zstd.c
+++ b/epan/tvbuff_zstd.c
@@ -70,6 +70,11 @@ tvbuff_t *tvb_uncompress_zstd(tvbuff_t *tvb, const int offset, int comprlen)
count++;
DISSECTOR_ASSERT_HINT(count < MAX_LOOP_ITERATIONS, "MAX_LOOP_ITERATIONS exceeded");
}
+ if (rc > 0)
+ {
+ // There is extra data that was not decompressed.
+ goto end;
+ }
ok = true;
end: