From 21697b9c9edc672f62814b26477cb338d368f178 Mon Sep 17 00:00:00 2001 From: Fotis Xenakis Date: Fri, 12 Mar 2021 23:07:15 +0200 Subject: [PATCH 1/3] Fix seek table descriptor check when loading --- contrib/seekable_format/zstdseek_decompress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/seekable_format/zstdseek_decompress.c b/contrib/seekable_format/zstdseek_decompress.c index 748e76a3f..b78c6341a 100644 --- a/contrib/seekable_format/zstdseek_decompress.c +++ b/contrib/seekable_format/zstdseek_decompress.c @@ -332,7 +332,7 @@ static size_t ZSTD_seekable_loadSeekTable(ZSTD_seekable* zs) checksumFlag = sfd >> 7; /* check reserved bits */ - if ((checksumFlag >> 2) & 0x1f) { + if ((sfd >> 2) & 0x1f) { return ERROR(corruption_detected); } } From 3c6f5d5eca76a4386301f68d37497fd00a3a2c65 Mon Sep 17 00:00:00 2001 From: Fotis Xenakis Date: Sat, 13 Mar 2021 00:00:08 +0200 Subject: [PATCH 2/3] Fix seekable test to provide valid descriptor --- contrib/seekable_format/tests/seekable_tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/seekable_format/tests/seekable_tests.c b/contrib/seekable_format/tests/seekable_tests.c index 1d8871c26..a482638b9 100644 --- a/contrib/seekable_format/tests/seekable_tests.c +++ b/contrib/seekable_format/tests/seekable_tests.c @@ -103,7 +103,7 @@ int main(int argc, const char** argv) '\x00', '\x00', '\x00', - ';', + (uint8_t)('\x03'), (uint8_t)('\xb1'), (uint8_t)('\xea'), (uint8_t)('\x92'), From 316f3d2224fc530d65ff2ebf3e28235fdb9869da Mon Sep 17 00:00:00 2001 From: Fotis Xenakis Date: Sat, 13 Mar 2021 11:42:47 +0200 Subject: [PATCH 3/3] Run generic-dev:gcc-8-asan-ubsan-testzstd on latest Ubuntu --- .github/workflows/generic-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generic-dev.yml b/.github/workflows/generic-dev.yml index d6e9b44b4..14e2e281f 100644 --- a/.github/workflows/generic-dev.yml +++ b/.github/workflows/generic-dev.yml @@ -62,7 +62,7 @@ jobs: # zbufftest-dll : test that a user program can link to multi-threaded libzstd without specifying -pthread gcc-8-asan-ubsan-testzstd: - runs-on: ubuntu-16.04 # fails on 18.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: gcc-8 + ASan + UBSan + Test Zstd