]> granicus.if.org Git - php/commitdiff
- MFH: Fixed bug #47048 (Segfault with new pg_meta_data)
authorFelipe Pena <felipe@php.net>
Sun, 18 Jan 2009 23:51:15 +0000 (23:51 +0000)
committerFelipe Pena <felipe@php.net>
Sun, 18 Jan 2009 23:51:15 +0000 (23:51 +0000)
NEWS
ext/pgsql/pgsql.c

diff --git a/NEWS b/NEWS
index 1106032c51e60392056bd63a3ac482a993200dea..98c21db1830aba15ec5bfe8908b001f1083b813d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,7 @@ PHP                                                                        NEWS
 - Fixed bug #47104 (Linking shared extensions fails with icc). (Jani)
 - Fixed bug #47109 (Memory leak on $a->{"a"."b"} when $a is not an object).
   (Etienne, Dmitry)
+- Fixed bug #47048 (Segfault with new pg_meta_data). (Felipe)
 - Fixed bug #47042 (PHP cgi sapi is removing SCRIPT_FILENAME for non apache).
   (Sriram Natarajan)
 - Fixed bug #47037 (No error when using fopen with empty string). 
index 511d9a9c4ad02cc99d735dd40af516873173eea2..7e71fc5c8edd8fd2f8ccf9409d836f7b11f4598f 100644 (file)
@@ -4425,7 +4425,7 @@ PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, z
        src = estrdup(table_name);
        tmp_name = php_strtok_r(src, ".", &tmp_name2);
        
-       if (!*tmp_name2) {
+       if (!tmp_name2 || !*tmp_name2) {
                /* Default schema */
                tmp_name2 = tmp_name;
                tmp_name = "public";