From 75a31bacb1f12f8a45dd9c34fc0490ee7649554e Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sun, 18 Jan 2009 23:49:11 +0000 Subject: [PATCH] - Fixed bug #47048 (Segfault with new pg_meta_data) --- ext/pgsql/pgsql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"; -- 2.50.1