com php-src: Bacport fix bug #68741 - Null pointer dereference: NEWS ext/pgsql/pgsql.c

From: Date: Mon, 23 Mar 2015 01:30:05 +0000
Subject: com php-src: Bacport fix bug #68741 - Null pointer dereference: NEWS ext/pgsql/pgsql.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-85777@lists.php.net to get a copy of this message
Commit: 968fbc6acf0bc27be17c0209be7f966e89a55943 Author: Stanislav Malyshev <stas@php.net> Sun, 22 Mar 2015 18:20:59 -0700 Parents: fb83c76deec58f1fab17c350f04c9f042e5977d1 Branches: PHP-5.4 PHP-5.5 PHP-5.6 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=968fbc6acf0bc27be17c0209be7f966e89a55943 Log: Bacport fix bug #68741 - Null pointer dereference Bugs: https://bugs.php.net/68741 Changed paths: M NEWS M ext/pgsql/pgsql.c Diff: diff --git a/NEWS b/NEWS index 715227e..3656154 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,9 @@ PHP NEWS . Fixed bug #69152 (Type Confusion Infoleak Vulnerability in unserialize() with SoapFault). (Dmitry) +- Postgres: + . Fixed bug #68741 (Null pointer deference) (CVE-2015-1352). (Xinchen Hui) + 19 Mar 2015 PHP 5.4.39 - Core: diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 16ce7bf..eb55777 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -6117,6 +6117,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c /* schame.table should be "schame"."table" */ table_copy = estrdup(table); token = php_strtok_r(table_copy, ".", &tmp); + if (token == NULL) { + token = table; + } len = strlen(token); if (_php_pgsql_detect_identifier_escape(token, len) == SUCCESS) { smart_str_appendl(querystr, token, len);

« previous php.cvs (#85777) next »