Browse Source

fix pointer truncation on 64 bit

PHP-7.0.5
Anatol Belski 10 years ago
parent
commit
704a9aeea7
  1. 2
      ext/odbc/php_odbc.c

2
ext/odbc/php_odbc.c

@ -1535,7 +1535,7 @@ PHP_FUNCTION(odbc_cursor)
result->stmt, state, &error, errormsg,
sizeof(errormsg)-1, &errormsgsize);
if (!strncmp(state,"S1015",5)) {
snprintf(cursorname, max_len+1, "php_curs_%d", (int)result->stmt);
snprintf(cursorname, max_len+1, "php_curs_" ZEND_ULONG_FMT, (zend_ulong)result->stmt);
if (SQLSetCursorName(result->stmt,cursorname,SQL_NTS) != SQL_SUCCESS) {
odbc_sql_error(result->conn_ptr, result->stmt, "SQLSetCursorName");
RETVAL_FALSE;

Loading…
Cancel
Save