hiredis/hiredis.spec
cherry530 1bfbbb8fc2 fix memory uninitialized in fuzz testcase
Signed-off-by: cherry530 <xuping33@huawei.com>
(cherry picked from commit 58b1cf8b9b35faf706e430d96c85e9e8f1701baa)
2023-03-13 15:50:51 +08:00

81 lines
2.4 KiB
RPMSpec

Name: hiredis
Version: 1.0.2
Release: 3
Summary: A minimalistic C client library for the Redis database
License: BSD
URL: https://github.com/redis/hiredis
Source0: https://github.com/redis/hiredis/archive/refs/tags/v%{version}.tar.gz
BuildRequires: gcc redis
Patch0001: fix-heap-buffer-overflow-in-redisvFormatCommand.patch
Patch0002: fix-memory-uninitialized-in-fuzz-testcase.patch
%description
Hiredis is a minimalistic C client library for the Redis database.
It is minimalistic because it just adds minimal support for the protocol,
but at the same time it uses a high level printf-alike API in order to make it much higher level than
otherwise suggested by its minimal code base and the lack of explicit bindings for every Redis command.
Apart from supporting sending commands and receiving replies, it comes with a reply parser that
is decoupled from the I/O layer.It is a stream parser designed for easy reusability, which can
for instance be used in higher level language bindings for efficient reply parsing.
%package devel
Summary: Development files for hiredis
Requires: hiredis = %{version}-%{release}
%description devel
The hiredis-devel package contains development files to build applications for hiredis.
%prep
%autosetup -p1
%build
%make_build PREFIX="%{_prefix}" LIBRARY_PATH="%{_lib}" DEBUG="%{optflags}" LDFLAGS="%{?__global_ldflags}"
%install
%make_install PREFIX="%{_prefix}" LIBRARY_PATH="%{_lib}"
find $RPM_BUILD_ROOT -type f -name "*.a" -delete
cd $RPM_BUILD_ROOT%{_libdir}
ln -sf libhiredis.so.0.13 libhiredis.so.0
%check
make check || true
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%doc COPYING
%{_libdir}/libhiredis.so.*
%files devel
%doc CHANGELOG.md README.md
%{_includedir}/hiredis/
%{_libdir}/libhiredis.so
%{_libdir}/pkgconfig/hiredis.pc
%changelog
* Fri Dec 16 2022 xu_ping <xuping33@h-partners.com> - 1.0.2-3
- fix memory uninitialized in fuzz testcase
* Tue May 24 2022 loong_C <loong_c@yeah.net> - 1.0.2-2
- fix spec changelog date
* Mon Oct 11 2021 houyingchao<houyingchao@huawei.com> - 1.0.2-1
- Fix CVE-2021-32765
* Fri Jun 4 2021 lingsheng<lingsheng@huawei.com> - 0.13.3-12
- fix heap buffer overflow in redisvFormatCommand
* Tue Mar 17 2020 likexin<likexin4@huawei.com> - 0.13.3-11
- fix up cve-2020-7105
* Tue Dec 31 2019 liujing<liujing144@huawei.com> - 0.13.3-10
- Package init