]> granicus.if.org Git - php/commitdiff
Fixed bug #50323 (Allow use of ; in values via ;; in PDO DSN).
authorIlia Alshanetsky <iliaa@php.net>
Sun, 6 Dec 2009 19:34:12 +0000 (19:34 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 6 Dec 2009 19:34:12 +0000 (19:34 +0000)
NEWS
ext/pdo/pdo.c

diff --git a/NEWS b/NEWS
index 4370736e445850a5a7747436f00989ef6349f411..2a502d7295652b4820a1a2ed484a6fb27a6f3c51 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ PHP                                                                        NEWS
 
 - Fixed bug #50345 (nanosleep not detected properly on some solaris versions).
   (Jani)
+- Fixed bug #50323 (Allow use of ; in values via ;; in PDO DSN). (Ilia)
 - Fixed bug #50266 (conflicting types for llabs). (Jani)
 - Fixed bug #50168 (FastCGI fails with wrong error on HEAD request to
   non-existent file). (Dmitry)
index 048809775dd73cf546c977ed7c2d4f08a1213d47..31875431874ab9822efc6ffbe34ccca25424bb95 100755 (executable)
@@ -240,7 +240,7 @@ PDO_API int php_pdo_parse_data_source(const char *data_source,
                                semi = i++;
                                break;
                        }
-                       if (data_source[i] == ';') {
+                       if (data_source[i] == ';' && ((i + 1 >= data_source_len) || data_source[i+1] != ';')) {
                                semi = i++;
                                break;
                        }