php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch 0001-Change-a-variable-s-type-from-SDWORD-to-SQLLEN-to-av.patch for ODBC related Bug #66311

Patch version 2013-12-17 20:07 UTC

Return to Bug #66311 | Download this patch
Patch Revisions:

Developer: michael@orlitzky.com

From 16d8430a1acf987f0b00385faf0040ca8ed1c99c Mon Sep 17 00:00:00 2001
From: Michael Orlitzky <michael@orlitzky.com>
Date: Tue, 17 Dec 2013 14:37:28 -0500
Subject: [PATCH] Change a variable's type from SDWORD to SQLLEN to avoid
 stack-smashing protection in newer GCC.

---
 ext/pdo_odbc/odbc_stmt.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c
index 0e3fd3c..39c3d3a 100644
--- a/ext/pdo_odbc/odbc_stmt.c
+++ b/ext/pdo_odbc/odbc_stmt.c
@@ -551,7 +551,8 @@ static int odbc_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC)
 	struct pdo_column_data *col = &stmt->columns[colno];
 	RETCODE rc;
 	SWORD	colnamelen;
-	SDWORD	colsize, displaysize;
+	SDWORD	colsize;
+	SQLLEN  displaysize;
 
 	rc = SQLDescribeCol(S->stmt, colno+1, S->cols[colno].colname,
 			sizeof(S->cols[colno].colname)-1, &colnamelen,
-- 
1.8.3.2

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 13:01:30 2024 UTC