From e71625c8d1bb0ed5019ba5fd860781ef17efcc7c Mon Sep 17 00:00:00 2001 From: Bojan Smojver Date: Tue, 1 Apr 2014 18:57:56 +1100 Subject: [PATCH] Fix a memset() call. --- xrdp-0.6.1-memset.patch | 16 ++++++++++++++++ xrdp.spec | 7 +++++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 xrdp-0.6.1-memset.patch diff --git a/xrdp-0.6.1-memset.patch b/xrdp-0.6.1-memset.patch new file mode 100644 index 0000000..d7cf72e --- /dev/null +++ b/xrdp-0.6.1-memset.patch @@ -0,0 +1,16 @@ +diff -ruN xrdp-v0.6.1-orig/common/os_calls.c xrdp-v0.6.1/common/os_calls.c +--- xrdp-v0.6.1-orig/common/os_calls.c 2013-11-10 07:11:15.000000000 +1100 ++++ xrdp-v0.6.1/common/os_calls.c 2014-04-01 18:29:15.585633769 +1100 +@@ -567,10 +567,10 @@ + { + struct sockaddr_in s; + struct in_addr in; +- int len; ++ socklen_t len; + int ip_port; + +- memset(&s,0,sizeof(&s)); ++ memset(&s,0,sizeof(s)); + len = sizeof(s); + getpeername(rcv_sck,(struct sockaddr*)&s, &len); + diff --git a/xrdp.spec b/xrdp.spec index 0e061bf..6654d03 100644 --- a/xrdp.spec +++ b/xrdp.spec @@ -1,7 +1,7 @@ Summary: Open source remote desktop protocol (RDP) server Name: xrdp Version: 0.6.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ with exceptions Group: Applications/Internet URL: http://xrdp.sourceforge.net/ @@ -14,6 +14,7 @@ Patch2: xrdp-pam_session.patch # https://bugzilla.redhat.com/show_bug.cgi?id=905411 Patch3: xrdp-endian.patch Patch4: xrdp-0.6.1-syslog-format.patch +Patch5: xrdp-0.6.1-memset.patch Source1: xrdp.service Source2: xrdp-sesman.service @@ -50,6 +51,7 @@ terminal server / remote desktop clients. %patch2 -p1 %patch3 -p1 -b .endian %patch4 -p1 -b .syslog-format +%patch5 -p1 -b .memset # remove unused modules from xrdp login combobox %{__sed} -i -e '/\[xrdp2\]/,$d' xrdp/xrdp.ini @@ -190,9 +192,10 @@ fi %attr(0600,root,root) %verify(not size md5 mtime) %{_sysconfdir}/xrdp/rsakeys.ini %changelog -* Tue Apr 1 2014 Bojan Smojver - 0.6.1-1 +* Tue Apr 1 2014 Bojan Smojver - 0.6.1-2 - try a bump to official 0.6.1 - provide format for syslog() call +- fix memset() call * Sun Aug 04 2013 Fedora Release Engineering - 0.6.0-0.8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild