]> git.ipfire.org Git - thirdparty/zstd.git/commit
[fix] Add check on failed allocation in legacy/zstd_v06 4050/head
authorAdenilson Cavalcanti <cavalcantii@chromium.org>
Fri, 17 May 2024 20:37:55 +0000 (13:37 -0700)
committerAdenilson Cavalcanti <cavalcantii@chromium.org>
Fri, 17 May 2024 22:40:28 +0000 (15:40 -0700)
commit1872688e0adb630e8710cb3d17846ca49f596e46
treef8bbb34dbd1f76674881a5b4de552f4367c3acbf
parent78955f5f9ddb3601566884ce217d91c132f5edc1
[fix] Add check on failed allocation in legacy/zstd_v06

As reported by Ben Hawkes in #4026, a failure to allocate a zstd context
would lead to a dereference of a NULL pointer due to a missing check
on the returned result of ZSTDv06_createDCtx().

This patch fix the issue by adding a check for valid returned pointer.
lib/legacy/zstd_v06.c