summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-04-09 13:10:42 +0200
committerRemi Collet <fedora@famillecollet.com>2015-04-09 13:10:42 +0200
commitb62477ae70d01286a33b9faf812d5ce7b8376ee5 (patch)
tree17bf9908c7905e82337c197e99755fcf87ba7d6f
parent7b84c4cb5bbe4aed0b90309b70db6a23611a37cc (diff)
PHP 5.4: add patch from 5.5.14 for https://bugs.php.net/50444
-rw-r--r--php-5.4.39-bug50444.patch55
-rw-r--r--php.spec8
2 files changed, 62 insertions, 1 deletions
diff --git a/php-5.4.39-bug50444.patch b/php-5.4.39-bug50444.patch
new file mode 100644
index 0000000..5dd7bbd
--- /dev/null
+++ b/php-5.4.39-bug50444.patch
@@ -0,0 +1,55 @@
+From 186ffcb72c982b0235761bdd6388ff1c36d79568 Mon Sep 17 00:00:00 2001
+From: Andrew Kehrig <kehrigan@gmail.com>
+Date: Mon, 24 Feb 2014 12:01:58 -0500
+Subject: [PATCH] Fix #50444: PDO-ODBC changes for 64-bit
+
+This bug is also referenced in
+[#61777](https://bugs.php.net/bug.php?id=61777) and is still present in
+the latest stable release of the 5.5 branch. I see two tickets exist for
+this problem already, and I'm just submitting these changes via github
+as a reminder that this is a serious problem for anyone using PDO_ODBC
+on the x64 builds.
+---
+ NEWS | 3 +++
+ ext/pdo_odbc/odbc_stmt.c | 4 ++--
+ ext/pdo_odbc/php_pdo_odbc_int.h | 2 +-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c
+index 8b0ccf3..1d275cd 100644
+--- a/ext/pdo_odbc/odbc_stmt.c
++++ b/ext/pdo_odbc/odbc_stmt.c
+@@ -279,7 +279,7 @@ static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *p
+ pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data;
+ RETCODE rc;
+ SWORD sqltype = 0, ctype = 0, scale = 0, nullable = 0;
+- UDWORD precision = 0;
++ SQLULEN precision = 0;
+ pdo_odbc_param *P;
+
+ /* we're only interested in parameters for prepared SQL right now */
+@@ -551,7 +551,7 @@ 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;
++ SQLULEN colsize;
+ SQLLEN displaysize;
+
+ rc = SQLDescribeCol(S->stmt, colno+1, S->cols[colno].colname,
+diff --git a/ext/pdo_odbc/php_pdo_odbc_int.h b/ext/pdo_odbc/php_pdo_odbc_int.h
+index 87b2f91..5e42951 100644
+--- a/ext/pdo_odbc/php_pdo_odbc_int.h
++++ b/ext/pdo_odbc/php_pdo_odbc_int.h
+@@ -157,7 +157,7 @@ typedef struct {
+ } pdo_odbc_stmt;
+
+ typedef struct {
+- SQLINTEGER len;
++ SQLLEN len;
+ SQLSMALLINT paramtype;
+ char *outbuf;
+ unsigned is_unicode:1;
+--
+2.1.4
+
diff --git a/php.spec b/php.spec
index be5c307..1b0930e 100644
--- a/php.spec
+++ b/php.spec
@@ -109,7 +109,7 @@
Summary: PHP scripting language for creating dynamic web sites
Name: %{?scl_prefix}php
Version: 5.4.39
-Release: 1%{?dist}
+Release: 2%{?dist}
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
# TSRM is licensed under BSD
@@ -163,6 +163,8 @@ Patch91: php-5.3.7-oci8conf.patch
Patch100: php-5.4.33-bug65641.patch
# Backported from 5.5.16 for https://bugs.php.net/67635
Patch101: php-5.4.38-systemd.patch
+# Backported from 5.5.14 for https://bugs.php.net/50444
+Patch102: php-5.4.39-bug50444.patch
# Security fixes (200+)
@@ -792,6 +794,7 @@ support for using the enchant library to PHP.
# upstream patches
%patch100 -p1 -b .bug65641
%patch101 -p1 -b .bug65635
+%patch102 -p1 -b .bug50444
# security patches
@@ -1590,6 +1593,9 @@ fi
%changelog
+* Thu Apr 9 2015 Remi Collet <remi@fedoraproject.org> 5.4.39-2
+- add patch from 5.5.14 for https://bugs.php.net/50444
+
* Thu Mar 19 2015 Remi Collet <remi@fedoraproject.org> 5.4.39-1
- Update to 5.4.39
http://www.php.net/releases/5_4_39.php