/[smeserver]/rpms/php/sme8/php-5.3.3-pdo-53551.patch
ViewVC logotype

Contents of /rpms/php/sme8/php-5.3.3-pdo-53551.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Mon Dec 16 10:46:47 2013 UTC (10 years, 10 months ago) by vip-ire
Branch: MAIN
CVS Tags: php-5_3_3-14_el5_sme, php-5_3_3-17_el5_sme, php-5_3_3-15_el5_sme, php-5_3_3-16_el5_sme, HEAD
* Mon Dec 16 2013 Daniel Berteaud <daniel@firewall-services.com> - 5.3.3-14.sme
- Resync with upstream php53, which include:
- add security fix for CVE-2013-6420
- add security fix for CVE-2013-4248
- add upstream reproducer for error_handler (#951075)
- add security fixes for CVE-2006-7243
- add security fixes for CVE-2012-2688, CVE-2012-0831,
  CVE-2011-1398, CVE-2013-1643
- fix segfault in error_handler with
  allow_call_time_pass_reference = Off (#951075)
- fix double free when destroy_zend_class fails (#951076)
- fix possible buffer overflow in pdo_odbc (#869694)
- php script hangs when it exceeds max_execution_time
  when inside an ODBC call (#864954)
- fix zend garbage collector (#892695)
- fix transposed memset arguments in libzip (#953818)
- fix possible segfault in pdo_mysql (#869693)
- fix imap_open DISABLE_AUTHENTICATOR param ignores array (#859369)
- fix stream support in fileinfo (#869697)
- fix setDate when DateTime created from timestamp (#869691)
- fix permission on source files (#869688)
- add php(language) and missing provides (#837044)
-
- fix copy doesn't report failure on partial copy (#951413)

1 From 22b42afaee7fc18019696faaa0bf6146f5fbea65 Mon Sep 17 00:00:00 2001
2 From: =?utf8?q?Johannes=20Schl=C3=BCter?= <johannes@php.net>
3 Date: Fri, 14 Jan 2011 14:57:57 +0000
4 Subject: [PATCH] - Fix #53551 (PDOStatement execute segfaults for pdo_mysql
5 driver)
6
7 ---
8 NEWS | 4 ++
9 ext/pdo_mysql/mysql_statement.c | 3 +-
10 ext/pdo_mysql/tests/bug53551.phpt | 73 +++++++++++++++++++++++++++++++++++++
11 3 files changed, 78 insertions(+), 2 deletions(-)
12 create mode 100644 ext/pdo_mysql/tests/bug53551.phpt
13
14 diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c
15 index a431598..79694b3 100755
16 --- a/ext/pdo_mysql/mysql_statement.c
17 +++ b/ext/pdo_mysql/mysql_statement.c
18 @@ -142,8 +142,7 @@ static int pdo_mysql_stmt_execute_prepared_libmysql(pdo_stmt_t *stmt TSRMLS_DC)
19 /* (re)bind the parameters */
20 if (mysql_stmt_bind_param(S->stmt, S->params) || mysql_stmt_execute(S->stmt)) {
21 if (S->params) {
22 - efree(S->params);
23 - S->params = 0;
24 + memset(S->params, 0, S->num_params * sizeof(MYSQL_BIND));
25 }
26 pdo_mysql_error_stmt(stmt);
27 if (mysql_stmt_errno(S->stmt) == 2057) {
28 diff --git a/ext/pdo_mysql/tests/bug53551.phpt b/ext/pdo_mysql/tests/bug53551.phpt
29 new file mode 100644
30 index 0000000..865dcea
31 --- /dev/null
32 +++ b/ext/pdo_mysql/tests/bug53551.phpt
33 @@ -0,0 +1,73 @@
34 +--TEST--
35 +Bug #44327 (PDORow::queryString property & numeric offsets / Crash)
36 +--SKIPIF--
37 +<?php
38 +require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
39 +require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
40 +MySQLPDOTest::skip();
41 +$db = MySQLPDOTest::factory();
42 +?>
43 +--FILE--
44 +<?php
45 +include __DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc';
46 +$db = MySQLPDOTest::factory();
47 +
48 +$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0);
49 +
50 +$createSql = "CREATE TABLE `bug53551` (
51 + `count` bigint(20) unsigned NOT NULL DEFAULT '0'
52 +)";
53 +
54 +$db->exec('drop table if exists bug53551');
55 +$db->exec($createSql);
56 +$db->exec("insert into bug53551 set `count` = 1 ");
57 +$db->exec("SET sql_mode = 'Traditional'");
58 +$sql = 'UPDATE bug53551 SET `count` = :count';
59 +$stmt = $db->prepare($sql);
60 +
61 +$values = array (
62 + 'count' => NULL,
63 +);
64 +
65 +echo "1\n";
66 +$stmt->execute($values);
67 +var_dump($stmt->errorInfo());
68 +
69 +echo "2\n";
70 +$stmt->execute($values);
71 +var_dump($stmt->errorInfo());
72 +
73 +echo "\ndone\n";
74 +
75 +?>
76 +--CLEAN--
77 +<?php
78 +include __DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc';
79 +$db = MySQLPDOTest::factory();
80 +$db->exec('DROP TABLE IF EXISTS bug53551');
81 +?>
82 +--EXPECTF--
83 +1
84 +
85 +Warning: PDOStatement::execute(): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'count' cannot be null in %s on line %d
86 +array(3) {
87 + [0]=>
88 + string(5) "23000"
89 + [1]=>
90 + int(1048)
91 + [2]=>
92 + string(29) "Column 'count' cannot be null"
93 +}
94 +2
95 +
96 +Warning: PDOStatement::execute(): SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'count' cannot be null in %s on line %d
97 +array(3) {
98 + [0]=>
99 + string(5) "23000"
100 + [1]=>
101 + int(1048)
102 + [2]=>
103 + string(29) "Column 'count' cannot be null"
104 +}
105 +
106 +done
107 --
108 1.7.8
109

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed