From 5c19355095e10d261e81959eac7d557e8b30ab9a Mon Sep 17 00:00:00 2001 From: "MiRacLe.RPZ" Date: Wed, 2 Sep 2015 22:36:14 +0300 Subject: [PATCH] dblib's dbcolname can return null in some cases --- ext/pdo_dblib/dblib_stmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.40.0