[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pecl-cvs
Subject:    [PECL-CVS] com pecl/networking/ssh2: Fix #80294: ssh2 wrappers not using an allocated resource segfa
From:       Casper Langemeijer <langemeijer () php ! net>
Date:       2021-02-10 11:15:58
Message-ID: php-mail-f42a6ff4e94a603043e39251d8f40a6a1779635969 () git ! php ! net
[Download RAW message or body]

Commit:    6742e3f71c19ac0421ff534b54427794218698ee
Author:    Christoph M. Becker <cmbecker69@gmx.de>         Wed, 10 Feb 2021 12:14:46 \
                +0100
Parents:   93265d71bdeb23350e8320126c7949ed791310df
Branches:  master

Link:       http://git.php.net/?p=pecl/networking/ssh2.git;a=commitdiff;h=6742e3f71c19ac0421ff534b54427794218698ee


Log:
Fix #80294: ssh2 wrappers not using an allocated resource segfault

We need to properly initialize the SSH2 Session resource.

Bugs:
https://bugs.php.net/80294

Changed paths:
  M  ssh2_fopen_wrappers.c


Diff:
diff --git a/ssh2_fopen_wrappers.c b/ssh2_fopen_wrappers.c
index 2089a88..0ec0126 100644
--- a/ssh2_fopen_wrappers.c
+++ b/ssh2_fopen_wrappers.c
@@ -498,8 +498,7 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char \
*type, php_stre  return NULL;
 
 session_authed:
-	//TODO Sean-Der
-	//ZEND_REGISTER_RESOURCE(&zsession, session, le_ssh2_session);
+	ZVAL_RES(&zsession, zend_register_resource(session, le_ssh2_session));
 
 	if (psftp) {
 		LIBSSH2_SFTP *sftp;


--
PECL CVS Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic