1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 01:18:19 +02:00

Fix bug #67134 (PDO_DBLIB Missing null string terminator)

This commit is contained in:
Stanley Sufficool
2014-10-20 21:44:47 -07:00
parent 8defcb855a
commit 09cf64678a
+2 -3
View File
@@ -255,12 +255,11 @@ static int pdo_dblib_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr,
break;
}
case SQLUNIQUE: {
*len = 36+1;
*len = 37;
tmp_ptr = emalloc(*len + 1);
/* uniqueidentifier is a 16-byte binary number, convert to 32 char hex string */
*len = dbconvert(NULL, SQLUNIQUE, *ptr, *len, SQLCHAR, tmp_ptr, *len);
php_strtoupper(tmp_ptr, *len);
tmp_ptr[36] = '\0';
*ptr = tmp_ptr;
break;
}