felipe          Sun, 19 Jul 2009 14:36:16 +0000

URL: http://svn.php.net/viewvc?view=revision&revision=284352

Changed paths:
        U   php/php-src/branches/PHP_5_2/ext/curl/interface.c
        U   php/php-src/branches/PHP_5_3/ext/curl/interface.c
        U   php/php-src/trunk/ext/curl/interface.c

Log:
- Removed unnecessary strlen() call and if statement.


Modified: php/php-src/branches/PHP_5_2/ext/curl/interface.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-07-19 14:19:32 UTC 
(rev 284351)
+++ php/php-src/branches/PHP_5_2/ext/curl/interface.c   2009-07-19 14:36:16 UTC 
(rev 284352)
@@ -1576,14 +1576,11 @@
                                                char *type;
                                                ++postval;

-                                               if ((type = 
php_memnstr(postval, ";type=", sizeof(";type=") - 1, postval + 
strlen(postval)))) {
+                                               if ((type = 
php_memnstr(postval, ";type=", sizeof(";type=") - 1, postval + 
Z_STRLEN_PP(current)))) {
                                                        *type = '\0';
                                                }
                                                /* safe_mode / open_basedir 
check */
                                                if 
(php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) && 
!php_checkuid(postval, "rb+", CHECKUID_CHECK_MODE_PARAM))) {
-                                                       if (type) {
-                                                               *type = ';';
-                                                       }
                                                        RETVAL_FALSE;
                                                        return 1;
                                                }

Modified: php/php-src/branches/PHP_5_3/ext/curl/interface.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/curl/interface.c   2009-07-19 14:19:32 UTC 
(rev 284351)
+++ php/php-src/branches/PHP_5_3/ext/curl/interface.c   2009-07-19 14:36:16 UTC 
(rev 284352)
@@ -1803,14 +1803,11 @@
                                                char *type;
                                                ++postval;

-                                               if ((type = 
php_memnstr(postval, ";type=", sizeof(";type=") - 1, postval + 
strlen(postval)))) {
+                                               if ((type = 
php_memnstr(postval, ";type=", sizeof(";type=") - 1, postval + 
Z_STRLEN_PP(current)))) {
                                                        *type = '\0';
                                                }
                                                /* safe_mode / open_basedir 
check */
                                                if 
(php_check_open_basedir(postval TSRMLS_CC) || (PG(safe_mode) && 
!php_checkuid(postval, "rb+", CHECKUID_CHECK_MODE_PARAM))) {
-                                                       if (type) {
-                                                               *type = ';';
-                                                       }
                                                        RETVAL_FALSE;
                                                        return 1;
                                                }

Modified: php/php-src/trunk/ext/curl/interface.c
===================================================================
--- php/php-src/trunk/ext/curl/interface.c      2009-07-19 14:19:32 UTC (rev 
284351)
+++ php/php-src/trunk/ext/curl/interface.c      2009-07-19 14:36:16 UTC (rev 
284352)
@@ -1866,14 +1866,11 @@
                                                char *type;
                                                ++postval;

-                                               if ((type = 
php_memnstr(postval, ";type=", sizeof(";type=") - 1, postval + 
strlen(postval)))) {
+                                               if ((type = 
php_memnstr(postval, ";type=", sizeof(";type=") - 1, postval + 
Z_STRLEN_PP(current)))) {
                                                        *type = '\0';
                                                }
                                                /* open_basedir check */
                                                if 
(php_check_open_basedir(postval TSRMLS_CC)) {
-                                                       if (type) {
-                                                               *type = ';';
-                                                       }
                                                        RETVAL_FALSE;
                                                        return 1;
                                                }

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

Reply via email to