We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ZSTD_CONTENTSIZE_ERROR
1 parent 054f99b commit e9d53f6Copy full SHA for e9d53f6
lib/decompress/zstd_decompress.rs
@@ -1144,6 +1144,12 @@ fn get_frame_header_advanced(
1144
_ => ZSTD_CONTENTSIZE_UNKNOWN,
1145
};
1146
1147
+ // We check for content size error here because the original C code would also interpret this
1148
+ // content size as an error
1149
+ if frameContentSize == ZSTD_CONTENTSIZE_ERROR {
1150
+ return Err(Error::corruption_detected);
1151
+ }
1152
+
1153
if singleSegment {
1154
windowSize = frameContentSize;
1155
}
0 commit comments