From ca77aee2fa3307ed3ef919cc0bf6554148b72124 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 09:59:45 +0100 Subject: [PATCH] path to fix crash with sftp/wordpress (https://bugs.launchpad.net/ubuntu/+source/php-ssh2/+bug/1407377) [release 0.12-2mamba;Sat Feb 21 2015] --- php-ssh2-0.12-fix_crash_sftp_wordpress.patch | 18 ++++++++++++++++++ php-ssh2.spec | 10 ++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 php-ssh2-0.12-fix_crash_sftp_wordpress.patch diff --git a/php-ssh2-0.12-fix_crash_sftp_wordpress.patch b/php-ssh2-0.12-fix_crash_sftp_wordpress.patch new file mode 100644 index 0000000..1cd3e1d --- /dev/null +++ b/php-ssh2-0.12-fix_crash_sftp_wordpress.patch @@ -0,0 +1,18 @@ +diff -Nru ssh2-0.12.orig/ssh2_fopen_wrappers.c ssh2-0.12/ssh2_fopen_wrappers.c +--- ssh2-0.12.orig/ssh2_fopen_wrappers.c 2012-10-02 22:18:07.000000000 +0200 ++++ ssh2-0.12/ssh2_fopen_wrappers.c 2015-02-21 19:06:32.274837384 +0100 +@@ -218,14 +218,6 @@ + return NULL; + } + +- /* +- Find resource->path in the path string, then copy the entire string from the original path. +- This includes ?query#fragment in the path string +- */ +- s = resource->path; +- resource->path = estrdup(strstr(path, resource->path)); +- efree(s); +- + /* Look for a resource ID to reuse a session */ + s = resource->host; + if (strncmp(resource->host, "Resource id #", sizeof("Resource id #") - 1) == 0) { diff --git a/php-ssh2.spec b/php-ssh2.spec index 737f94e..3e40248 100644 --- a/php-ssh2.spec +++ b/php-ssh2.spec @@ -1,14 +1,15 @@ %define php_majver %(php-config --version | cut -d. -f1-2) Name: php-ssh2 Version: 0.12 -Release: 1mamba +Release: 2mamba Summary: PHP bindings for the libssh2 library Group: Applications/Web Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco -URL: http://http://pecl.php.net/package/ssh2 +URL: http://pecl.php.net/package/ssh2 Source: http://pecl.php.net/get/ssh2-%{version}.tgz +Patch0: php-ssh2-0.12-fix_crash_sftp_wordpress.patch License: PHP License ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -27,6 +28,8 @@ PHP bindings for the libssh2 library. %prep %setup -q -c %{name}-%{version} +cd ssh2-%{version} +%patch0 -p1 %build cd ssh2-%{version} @@ -67,5 +70,8 @@ fi %doc ssh2-%{version}/LICENSE %changelog +* Sat Feb 21 2015 Silvan Calarco 0.12-2mamba +- path to fix crash with sftp/wordpress (https://bugs.launchpad.net/ubuntu/+source/php-ssh2/+bug/1407377) + * Fri Jan 30 2015 Silvan Calarco 0.12-1mamba - package created using the webbuild interface