Fix complete_incr_bin function
Resolves: rhbz#2046734
This commit is contained in:
parent
56cb123c23
commit
6cf28ae350
22
complete-incr-bin.patch
Normal file
22
complete-incr-bin.patch
Normal file
@ -0,0 +1,22 @@
|
||||
commit 8dfe2f07847a4ead1c54959de794557713bc9f79
|
||||
Author: Tomas Korbar <tkorbar@redhat.com>
|
||||
Date: Fri Jan 28 15:33:14 2022 +0100
|
||||
|
||||
Expand extbuf buffer
|
||||
|
||||
diff --git a/proto_bin.c b/proto_bin.c
|
||||
index b61c3bb..50b3591 100644
|
||||
--- a/proto_bin.c
|
||||
+++ b/proto_bin.c
|
||||
@@ -110,7 +110,10 @@ int try_read_command_binary(conn *c) {
|
||||
// want to refactor a ton of code either. Header is only ever used out
|
||||
// of c->binary_header, but the extlen stuff is used for the latter
|
||||
// bytes. Just wastes 24 bytes on the stack this way.
|
||||
- char extbuf[sizeof(c->binary_header) + BIN_MAX_EXTLEN+1];
|
||||
+
|
||||
+ // +4 need to be here because extbuf is used for protocol_binary_request_incr
|
||||
+ // and its member message is alligned to 48 bytes intead of 44
|
||||
+ char extbuf[sizeof(c->binary_header) + BIN_MAX_EXTLEN+4];
|
||||
memcpy(extbuf + sizeof(c->binary_header), c->rcurr + sizeof(c->binary_header),
|
||||
extlen > BIN_MAX_EXTLEN ? BIN_MAX_EXTLEN : extlen);
|
||||
c->rbytes -= sizeof(c->binary_header) + extlen + keylen;
|
@ -12,7 +12,7 @@
|
||||
|
||||
Name: memcached
|
||||
Version: 1.6.13
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Epoch: 0
|
||||
Summary: High Performance, Distributed Memory Object Cache
|
||||
|
||||
@ -24,6 +24,7 @@ Source1: memcached.sysconfig
|
||||
Source2: https://releases.pagure.org/memcached-selinux/memcached-selinux-1.0.2.tar.gz
|
||||
|
||||
Patch1: memcached-unit.patch
|
||||
Patch2: complete-incr-bin.patch
|
||||
|
||||
BuildRequires: make
|
||||
BuildRequires: gcc libevent-devel systemd
|
||||
@ -69,6 +70,7 @@ optimised for use with this version of memcached.
|
||||
# and SELinux policy sources into memcached-selinux-X.X
|
||||
%setup -q -b 2
|
||||
%patch1 -p1 -b .unit
|
||||
%patch2 -p1 -b .testing
|
||||
|
||||
%build
|
||||
%configure \
|
||||
@ -174,6 +176,10 @@ fi
|
||||
%license ../%{selinuxmoduledir}/COPYING
|
||||
|
||||
%changelog
|
||||
* Fri Jan 28 2022 Tomas Korbar <tkorbar@redhat.com> - 1.6.13-3
|
||||
- Fix complete_incr_bin function
|
||||
- Resolves: rhbz#2046734
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.6.13-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user