Merge pull request #2534 from foxeng/fix-seek-descriptor-check
Fix seek table descriptor check when loading
This commit is contained in:
commit
413b3198b0
2
.github/workflows/generic-dev.yml
vendored
2
.github/workflows/generic-dev.yml
vendored
@ -62,7 +62,7 @@ jobs:
|
|||||||
# zbufftest-dll : test that a user program can link to multi-threaded libzstd without specifying -pthread
|
# zbufftest-dll : test that a user program can link to multi-threaded libzstd without specifying -pthread
|
||||||
|
|
||||||
gcc-8-asan-ubsan-testzstd:
|
gcc-8-asan-ubsan-testzstd:
|
||||||
runs-on: ubuntu-16.04 # fails on 18.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: gcc-8 + ASan + UBSan + Test Zstd
|
- name: gcc-8 + ASan + UBSan + Test Zstd
|
||||||
|
@ -103,7 +103,7 @@ int main(int argc, const char** argv)
|
|||||||
'\x00',
|
'\x00',
|
||||||
'\x00',
|
'\x00',
|
||||||
'\x00',
|
'\x00',
|
||||||
';',
|
(uint8_t)('\x03'),
|
||||||
(uint8_t)('\xb1'),
|
(uint8_t)('\xb1'),
|
||||||
(uint8_t)('\xea'),
|
(uint8_t)('\xea'),
|
||||||
(uint8_t)('\x92'),
|
(uint8_t)('\x92'),
|
||||||
|
@ -332,7 +332,7 @@ static size_t ZSTD_seekable_loadSeekTable(ZSTD_seekable* zs)
|
|||||||
checksumFlag = sfd >> 7;
|
checksumFlag = sfd >> 7;
|
||||||
|
|
||||||
/* check reserved bits */
|
/* check reserved bits */
|
||||||
if ((checksumFlag >> 2) & 0x1f) {
|
if ((sfd >> 2) & 0x1f) {
|
||||||
return ERROR(corruption_detected);
|
return ERROR(corruption_detected);
|
||||||
} }
|
} }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user