arpad                                    Mon, 29 Aug 2011 21:11:07 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=315742

Log:
fix #55510: $_FILES 'name' missing first character after upload

Bug: https://bugs.php.net/55510 (Verified) $_FILES 'name' missing first 
character after upload.
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/main/rfc1867.c

Modified: php/php-src/branches/PHP_5_3/main/rfc1867.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/rfc1867.c 2011-08-29 20:50:33 UTC (rev 
315741)
+++ php/php-src/branches/PHP_5_3/main/rfc1867.c 2011-08-29 21:11:07 UTC (rev 
315742)
@@ -1210,11 +1210,12 @@
                        }
 #ifdef PHP_WIN32
                        if (PG(magic_quotes_gpc)) {
-                               s = s ? s : filename;
-                               tmp = strrchr(s, '\'');
-                               s = tmp > s ? tmp : s;
-                               tmp = strrchr(s, '"');
-                               s = tmp > s ? tmp : s;
+                               if ((tmp = strrchr(s ? s : filename, '\'')) > 
s) {
+                                       s = tmp;
+                               }
+                               if ((tmp = strrchr(s ? s : filename, '"')) > s) 
{
+                                       s = tmp;
+                               }
                        }
 #endif


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

Reply via email to