Do not leak memory in sample server (#852755)
This commit is contained in:
parent
f85e1a3ecd
commit
48b97a8104
13
cyrus-sasl-2.1.26-sample-leak.patch
Normal file
13
cyrus-sasl-2.1.26-sample-leak.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/sample/server.c b/sample/server.c
|
||||
index f5aff68..6c684af 100644
|
||||
--- a/sample/server.c
|
||||
+++ b/sample/server.c
|
||||
@@ -227,6 +227,8 @@ int mysasl_negotiate(FILE *in, FILE *out, sasl_conn_t *conn)
|
||||
|
||||
/* send capability list to client */
|
||||
send_string(out, data, len);
|
||||
+ if (mech)
|
||||
+ free(data);
|
||||
|
||||
dprintf(1, "waiting for client mechanism...\n");
|
||||
len = recv_string(in, chosenmech, sizeof chosenmech);
|
@ -54,6 +54,8 @@ Patch51: cyrus-sasl-2.1.26-sql.patch
|
||||
Patch52: cyrus-sasl-2.1.26-config-error.patch
|
||||
# Treat SCRAM-SHA-1/DIGEST-MD5 as more secure than PLAIN (#970718)
|
||||
Patch53: cyrus-sasl-2.1.26-prefer-SCRAM-SHA-1-over-PLAIN.patch
|
||||
# Do not leak memory in sample server (#852755)
|
||||
Patch54: cyrus-sasl-2.1.26-sample-leak.patch
|
||||
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: autoconf, automake, libtool, gdbm-devel, groff
|
||||
@ -198,6 +200,7 @@ chmod -x include/*.h
|
||||
%patch51 -p1 -b .sql
|
||||
%patch52 -p1 -b .configerr
|
||||
%patch53 -p1 -b .sha1vsplain
|
||||
%patch54 -p1 -b .leak
|
||||
|
||||
|
||||
%build
|
||||
|
Loading…
Reference in New Issue
Block a user