]> git.ipfire.org Git - thirdparty/zstd.git/commit
[superblock] Add defensive assert and bounds check 2214/head
authorNick Terrell <terrelln@fb.com>
Mon, 22 Jun 2020 17:21:38 +0000 (10:21 -0700)
committerNick Terrell <terrelln@fb.com>
Mon, 22 Jun 2020 17:21:38 +0000 (10:21 -0700)
commit1047097dadd5f8dfd47e25af0738eeb4bd82f6ec
treefd2c1c163fc615a95fcbacacee09aaca3b659183
parentf03192c122093770cd83a4f80f382d8bf4630c18
[superblock] Add defensive assert and bounds check

The bound check condition should always be met because we selected `set_basic` as
our encoding type. But that code is very far away, so assert it is true so if it is
ever false we can catch it, and add a bounds check.

Fixes #2213.
lib/compress/zstd_compress_superblock.c