[lz4] update to 1.9.4. (#28348)

This commit is contained in:
Koby Kahane 2023-01-05 00:47:07 +02:00 committed by GitHub
parent 6f70b430d6
commit 623771ee43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 36 deletions

View File

@ -1,26 +0,0 @@
From 8301a21773ef61656225e264f4f06ae14462bca7 Mon Sep 17 00:00:00 2001
From: Jasper Lievisse Adriaanse <j@jasper.la>
Date: Fri, 26 Feb 2021 15:21:20 +0100
Subject: [PATCH 001/120] Fix potential memory corruption with negative
memmove() size
---
lib/lz4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/lz4.c b/lib/lz4.c
index 5f524d0..c2f504e 100644
--- a/lib/lz4.c
+++ b/lib/lz4.c
@@ -1749,7 +1749,7 @@ LZ4_decompress_generic(
const size_t dictSize /* note : = 0 if noDict */
)
{
- if (src == NULL) { return -1; }
+ if ((src == NULL) || (outputSize < 0)) { return -1; }
{ const BYTE* ip = (const BYTE*) src;
const BYTE* const iend = ip + srcSize;
--
2.36.1

View File

@ -23,7 +23,7 @@ add_library(lz4
)
target_include_directories(lz4 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/lib> $<INSTALL_INTERFACE:include>)
set_target_properties(lz4 PROPERTIES PUBLIC_HEADER ${LZ4_HEADERS})
set_target_properties(lz4 PROPERTIES PUBLIC_HEADER "${LZ4_HEADERS}")
install(TARGETS lz4
EXPORT lz4Config
@ -53,5 +53,5 @@ file(STRINGS "lib/lz4.h" LZ4_H REGEX "^#define LZ4_VERSION_(MAJOR|MINOR|RELEASE)
string(REGEX REPLACE "^.*MAJOR +([0-9]+).*MINOR +([0-9]+).*RELEASE +([0-9]+).*$" "\\1.\\2.\\3" VERSION "${LZ4_H}")
set(INCLUDEDIR [[${prefix}/include]])
set(LIBDIR [[${prefix}/lib]])
configure_file(lib/liblz4.pc.in lib/liblz4.pc)
configure_file(lib/liblz4.pc.in lib/liblz4.pc @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/lib/liblz4.pc" DESTINATION "lib/pkgconfig")

View File

@ -1,11 +1,9 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO lz4/lz4
REF v1.9.3
SHA512 c246b0bda881ee9399fa1be490fa39f43b291bb1d9db72dba8a85db1a50aad416a97e9b300eee3d2a4203c2bd88bda2762e81bc229c3aa409ad217eb306a454c
REF v1.9.4
SHA512 043a9acb2417624019d73db140d83b80f1d7c43a6fd5be839193d68df8fd0b3f610d7ed4d628c2a9184f7cde9a0fd1ba9d075d8251298e3eb4b3a77f52736684
HEAD_REF dev
PATCHES
0001-Fix-potential-memory-corruption-with-negative-memmov.patch
)
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")

View File

@ -1,7 +1,6 @@
{
"name": "lz4",
"version": "1.9.3",
"port-version": 4,
"version": "1.9.4",
"description": "Lossless compression algorithm, providing compression speed at 400 MB/s per core.",
"homepage": "https://github.com/lz4/lz4",
"license": "BSD-2-Clause AND GPL-2.0-only",

View File

@ -4721,8 +4721,8 @@
"port-version": 1
},
"lz4": {
"baseline": "1.9.3",
"port-version": 4
"baseline": "1.9.4",
"port-version": 0
},
"lzfse": {
"baseline": "1.0",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "93e8c0e6177da62db34480c9f8b40d72b3561849",
"version": "1.9.4",
"port-version": 0
},
{
"git-tree": "f3b3f8d7799086d118dd166c346665ad71b66c19",
"version": "1.9.3",