|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-10-06 14:50 UTC] tsamu911 at gmai dot com
-PHP Version: 5.4.7
+PHP Version: Irrelevant
[2012-10-06 14:50 UTC] tsamu911 at gmai dot com
[2012-10-06 16:08 UTC] felipe@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: felipe
[2012-10-06 16:08 UTC] felipe@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 22 08:00:02 2025 UTC |
Description: ------------ Some svnserve server returns Zero-length error message like this. "( failure ( ( 170001 0: 56:C:\Projects\subversion- 1.4.4\subversion\svnserve\serve.c 443 ) ) )" In that case, svn_info() function causes Segmentation fault. I modified source file "svn.c" to avoid this problem; ---- php_svn_handle_error() in svn.c --- 266 smart_str_appendl(&s, ") ", 2); 267 smart_str_appendl(&s, itr->message, strlen(itr->message)); 268 ---- ---- modified code --- 266 smart_str_appendl(&s, ") ", 2); 267 if (itr->message) { 268 smart_str_appendl(&s, itr->message, strlen(itr->message)); 269 } else { 270 smart_str_appendl(&s, "(null)", 6); 271 } Test script: --------------- $url = "svn://(svnserve server)/"; $username = "(username)"; $password = "(password)"; svn_auth_set_parameter(PHP_SVN_AUTH_PARAM_IGNORE_SSL_VERIFY_ERRORS, true); svn_auth_set_parameter(SVN_AUTH_PARAM_NON_INTERACTIVE, true); svn_auth_set_parameter(SVN_AUTH_PARAM_NO_AUTH_CACHE, true); svn_auth_set_parameter(SVN_AUTH_PARAM_DONT_STORE_PASSWORDS, true); svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_USERNAME, "$username"); svn_auth_set_parameter(SVN_AUTH_PARAM_DEFAULT_PASSWORD, "$password"); $svn_info = svn_info($url, false, SVN_REVISION_HEAD); var_dump($svn_info); Expected result: ---------------- Warning is reported like this; Warning: svn_info(): svn error(s) occured 170001 (Authorization failed) (Could not get message) Actual result: -------------- Segmentation fault