From owner-svn-ports-all@FreeBSD.ORG Tue Apr 14 16:24:01 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A65AB265; Tue, 14 Apr 2015 16:24:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77A99A2E; Tue, 14 Apr 2015 16:24:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3EGO1rq065516; Tue, 14 Apr 2015 16:24:01 GMT (envelope-from mi@FreeBSD.org) Received: (from mi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3EGO1xY065515; Tue, 14 Apr 2015 16:24:01 GMT (envelope-from mi@FreeBSD.org) Message-Id: <201504141624.t3EGO1xY065515@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mi set sender to mi@FreeBSD.org using -f From: Mikhail Teterin Date: Tue, 14 Apr 2015 16:24:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r384004 - head/security/pecl-crack/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2015 16:24:01 -0000 Author: mi Date: Tue Apr 14 16:24:00 2015 New Revision: 384004 URL: https://svnweb.freebsd.org/changeset/ports/384004 Log: Remove the hunk replacing the original argument-parsing. Though the old code is ugly, it is correct and replacement is thus not warranted. Modified: head/security/pecl-crack/files/patch-modern-api Modified: head/security/pecl-crack/files/patch-modern-api ============================================================================== --- head/security/pecl-crack/files/patch-modern-api Tue Apr 14 15:09:01 2015 (r384003) +++ head/security/pecl-crack/files/patch-modern-api Tue Apr 14 16:24:00 2015 (r384004) @@ -1,5 +1,5 @@ --- crack.c 2005-09-21 05:00:06.000000000 -0400 -+++ crack.c 2015-04-13 20:41:24.000000000 -0400 ++++ crack.c 2015-04-14 12:19:37.774605000 -0400 @@ -32,5 +32,5 @@ #include "php_crack.h" @@ -115,49 +115,7 @@ + PWDICT *pwdict; int id = -1; -@@ -327,10 +291,36 @@ - } - -- if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "rs", &dictionary, &password, &password_len) == FAILURE) { -- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ssr", &password, &password_len, &username, &username_len, &gecos, &gecos_len, &dictionary) == FAILURE) { -- RETURN_FALSE; -- } -+ switch (ZEND_NUM_ARGS()) { -+ case 1: -+ id = zend_parse_parameters(1 TSRMLS_CC, "s", -+ &password, &password_len); -+ dictionary = NULL; -+ break; -+ case 2: -+ id = zend_parse_parameters(2 TSRMLS_CC, "rs", -+ &dictionary, -+ &password, &password_len); -+ break; -+ case 3: -+ id = zend_parse_parameters(3 TSRMLS_CC, "sss", -+ &password, &password_len, -+ &username, &username_len, -+ &gecos, &gecos_len); -+ dictionary = NULL; -+ break; -+ case 4: -+ id = zend_parse_parameters(4 TSRMLS_CC, "sssr", -+ &password, &password_len, -+ &username, &username_len, -+ &gecos, &gecos_len, -+ &dictionary); -+ break; -+ default: -+ WRONG_PARAM_COUNT; - } -- -+ -+ if (id == FAILURE) -+ RETURN_FALSE; -+ - if (NULL == dictionary) { - id = php_crack_get_default_dict(INTERNAL_FUNCTION_PARAM_PASSTHRU); -@@ -344,7 +334,7 @@ +@@ -344,7 +337,7 @@ } } - ZEND_FETCH_RESOURCE(pwdict, CRACKLIB_PWDICT *, &dictionary, id, "crack dictionary", le_crack);