php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch basename-check-invalid-character-encoding-patch for Filesystem function related Bug #68773

Patch version 2015-01-09 06:21 UTC

Return to Bug #68773 | Download this patch
Patch Revisions:

Developer: php@tokumaru.org

diff -Naur a/string.c b/string.c
--- a/string.c  2014-12-17 10:25:00.000000000 +0900
+++ b/string.c  2015-01-09 10:54:33.895303759 +0900
@@ -1424,6 +1424,10 @@
                        case -1:
                                inc_len = 1;
                                php_ignore_value(php_mblen(NULL, 0));
+                               if (state == 1) {
+                                       state = 0;
+                                       cend = c;
+                               }
                                break;
                        case 0:
                                goto quit_loop;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 02:01:28 2024 UTC