summaryrefslogtreecommitdiff
path: root/ext/pdo_dblib
diff options
context:
space:
mode:
authorMiRacLe.RPZ <miracle@rpz.name>2015-09-02 22:36:14 +0300
committerAnatol Belski <ab@php.net>2015-10-18 11:10:45 +0200
commit5c19355095e10d261e81959eac7d557e8b30ab9a (patch)
treeb86701040edae574db92776acb4a9d35e7b6a6eb /ext/pdo_dblib
parent4c8f064d7d2de2966407b4d048a35e0b5b4c78c5 (diff)
downloadphp-git-5c19355095e10d261e81959eac7d557e8b30ab9a.tar.gz
dblib's dbcolname can return null in some cases
Diffstat (limited to 'ext/pdo_dblib')
-rw-r--r--ext/pdo_dblib/dblib_stmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c
index 9f47f0f7ed..5efded9deb 100644
--- a/ext/pdo_dblib/dblib_stmt.c
+++ b/ext/pdo_dblib/dblib_stmt.c
@@ -206,7 +206,7 @@ static int pdo_dblib_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC)
char *fname = (char*)dbcolname(H->link, colno+1);
char computed_buf[16];
- if (*fname) {
+ if (fname && *fname) {
col->name = estrdup(fname);
} else {
snprintf(computed_buf,16,"computed%d", colno);