fix memory uninitialized in fuzz testcase
Signed-off-by: cherry530 <xuping33@huawei.com> (cherry picked from commit 58b1cf8b9b35faf706e430d96c85e9e8f1701baa)
This commit is contained in:
parent
574c658719
commit
1bfbbb8fc2
13
fix-memory-uninitialized-in-fuzz-testcase.patch
Normal file
13
fix-memory-uninitialized-in-fuzz-testcase.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/sds.c b/sds.c
|
||||||
|
index 49d2096..9d46dc4 100644
|
||||||
|
--- a/sds.c
|
||||||
|
+++ b/sds.c
|
||||||
|
@@ -513,7 +513,7 @@ sds sdscatvprintf(sds s, const char *fmt, va_list ap) {
|
||||||
|
} else {
|
||||||
|
buflen = sizeof(staticbuf);
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+ memset(buf, 0, buflen);
|
||||||
|
/* Try with buffers two times bigger every time we fail to
|
||||||
|
* fit the string in the current buffer size. */
|
||||||
|
while(1) {
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: hiredis
|
Name: hiredis
|
||||||
Version: 1.0.2
|
Version: 1.0.2
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: A minimalistic C client library for the Redis database
|
Summary: A minimalistic C client library for the Redis database
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: https://github.com/redis/hiredis
|
URL: https://github.com/redis/hiredis
|
||||||
@ -8,6 +8,7 @@ Source0: https://github.com/redis/hiredis/archive/refs/tags/v%{version}.t
|
|||||||
BuildRequires: gcc redis
|
BuildRequires: gcc redis
|
||||||
|
|
||||||
Patch0001: fix-heap-buffer-overflow-in-redisvFormatCommand.patch
|
Patch0001: fix-heap-buffer-overflow-in-redisvFormatCommand.patch
|
||||||
|
Patch0002: fix-memory-uninitialized-in-fuzz-testcase.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Hiredis is a minimalistic C client library for the Redis database.
|
Hiredis is a minimalistic C client library for the Redis database.
|
||||||
@ -60,6 +61,9 @@ make check || true
|
|||||||
%{_libdir}/pkgconfig/hiredis.pc
|
%{_libdir}/pkgconfig/hiredis.pc
|
||||||
|
|
||||||
%changelog
|
%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
|
* Tue May 24 2022 loong_C <loong_c@yeah.net> - 1.0.2-2
|
||||||
- fix spec changelog date
|
- fix spec changelog date
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user