Add patch to fix command line parsing segfault (bug #1150349) and to

fix old style command line options
This commit is contained in:
Orion Poplawski 2015-01-14 15:59:08 -07:00
parent 27e6fc1ab8
commit 5005bca61c
2 changed files with 36 additions and 1 deletions

27
freerdp-args.patch Normal file
View File

@ -0,0 +1,27 @@
diff -up FreeRDP-1.2.0-beta1-android9/client/common/cmdline.c.args FreeRDP-1.2.0-beta1-android9/client/common/cmdline.c
--- FreeRDP-1.2.0-beta1-android9/client/common/cmdline.c.args 2015-01-14 15:53:01.654250627 -0700
+++ FreeRDP-1.2.0-beta1-android9/client/common/cmdline.c 2015-01-14 15:54:14.634837903 -0700
@@ -1087,7 +1087,7 @@ BOOL freerdp_client_detect_command_line(
*flags |= COMMAND_LINE_SIGIL_DASH | COMMAND_LINE_SIGIL_DOUBLE_DASH;
*flags |= COMMAND_LINE_SIGIL_ENABLE_DISABLE;
- if (windows_cli_count >= posix_cli_count)
+ if ((windows_cli_count >= 0) && (windows_cli_count >= posix_cli_count))
{
*flags = COMMAND_LINE_SEPARATOR_COLON;
*flags |= COMMAND_LINE_SIGIL_SLASH | COMMAND_LINE_SIGIL_PLUS_MINUS;
diff -up FreeRDP-1.2.0-beta1-android9/client/common/compatibility.c.args FreeRDP-1.2.0-beta1-android9/client/common/compatibility.c
--- FreeRDP-1.2.0-beta1-android9/client/common/compatibility.c.args 2014-09-11 16:46:32.000000000 -0600
+++ FreeRDP-1.2.0-beta1-android9/client/common/compatibility.c 2015-01-14 15:53:01.655250622 -0700
@@ -262,8 +262,10 @@ int freerdp_client_old_command_line_pre_
}
if (p != NULL)
- {
p = strchr(p, ':');
+
+ if (p != NULL)
+ {
length = (int) (p - a);
args->argv[j + 1] = (char*) malloc(length + 1);
CopyMemory(args->argv[j + 1], a, length);

View File

@ -1,6 +1,6 @@
Name: freerdp
Version: 1.2.0
Release: 0.4.beta.1%{?dist}
Release: 0.5.beta.1%{?dist}
Epoch: 1
Summary: Free implementation of the Remote Desktop Protocol (RDP)
@ -10,6 +10,9 @@ Source0: https://github.com/FreeRDP/FreeRDP/archive/%{version}-beta1+andr
Patch0: freerdp-aarch64.patch
# https://github.com/FreeRDP/FreeRDP/commit/1b663ceffe51008af7ae9749e5b7999b2f7d6698
Patch1: freerdp-cmake-list.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1150349
# https://github.com/FreeRDP/FreeRDP/pull/2305
Patch2: freerdp-args.patch
BuildRequires: alsa-lib-devel
BuildRequires: cmake >= 2.8
@ -90,6 +93,7 @@ developing applications that use %{name}-libwinpr.
%setup -qn FreeRDP-%{version}-beta1-android9
%patch0 -p1 -b .aarch64
%patch1 -p1 -b .cmake-list
%patch2 -p1 -b .args
# Rpmlint fixes
find . -name "*.h" -exec chmod 664 {} \;
@ -183,6 +187,10 @@ find %{buildroot} -name "*.a" -delete
%{_libdir}/pkgconfig/winpr.pc
%changelog
* Wed Jan 14 2015 Orion Poplawski <orion@cora.nwra.com> - 1:1.2.0-0.5.beta.1
- Add patch to fix command line parsing segfault (bug #1150349) and to
fix old style command line options
* Tue Dec 16 2014 Simone Caronni <negativo17@gmail.com> - 1:1.2.0-0.4.beta.1
- Fix build on CMake 3.1.