Skip to content

Commit 968fbc6

Browse files
committed
Bacport fix bug #68741 - Null pointer dereference
1 parent fb83c76 commit 968fbc6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ PHP NEWS
66
. Fixed bug #69152 (Type Confusion Infoleak Vulnerability in unserialize()
77
with SoapFault). (Dmitry)
88

9+
- Postgres:
10+
. Fixed bug #68741 (Null pointer deference) (CVE-2015-1352). (Xinchen Hui)
11+
912
19 Mar 2015 PHP 5.4.39
1013

1114
- Core:

ext/pgsql/pgsql.c

+3
Original file line numberDiff line numberDiff line change
@@ -6117,6 +6117,9 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c
61176117
/* schame.table should be "schame"."table" */
61186118
table_copy = estrdup(table);
61196119
token = php_strtok_r(table_copy, ".", &tmp);
6120+
if (token == NULL) {
6121+
token = table;
6122+
}
61206123
len = strlen(token);
61216124
if (_php_pgsql_detect_identifier_escape(token, len) == SUCCESS) {
61226125
smart_str_appendl(querystr, token, len);

0 commit comments

Comments
 (0)