From: Felipe Pena Date: Sun, 18 Jan 2009 23:49:11 +0000 (+0000) Subject: - Fixed bug #47048 (Segfault with new pg_meta_data) X-Git-Tag: php-5.4.0alpha1~191^2~4477 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=75a31bacb1f12f8a45dd9c34fc0490ee7649554e;p=php - Fixed bug #47048 (Segfault with new pg_meta_data) --- diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 3f06774226..999e472a6a 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -4830,7 +4830,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";