felipe          Thu Nov 13 13:09:47 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/pdo    pdo_sql_parser.c pdo_sql_parser.re 
  Log:
  - MFH: Fixed invalid reads
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_sql_parser.c?r1=1.35.2.6.2.17&r2=1.35.2.6.2.18&diff_format=u
Index: php-src/ext/pdo/pdo_sql_parser.c
diff -u php-src/ext/pdo/pdo_sql_parser.c:1.35.2.6.2.17 
php-src/ext/pdo/pdo_sql_parser.c:1.35.2.6.2.18
--- php-src/ext/pdo/pdo_sql_parser.c:1.35.2.6.2.17      Thu Oct 23 18:56:05 2008
+++ php-src/ext/pdo/pdo_sql_parser.c    Thu Nov 13 13:09:47 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Thu Oct 23 16:18:59 2008 */
+/* Generated by re2c 0.13.6.dev on Thu Nov 13 11:09:07 2008 */
 #line 1 "ext/pdo/pdo_sql_parser.re"
 /*
   +----------------------------------------------------------------------+
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_sql_parser.c,v 1.35.2.6.2.17 2008/10/23 18:56:05 felipe Exp $ */
+/* $Id: pdo_sql_parser.c,v 1.35.2.6.2.18 2008/11/13 13:09:47 felipe Exp $ */
 
 #include "php.h"
 #include "php_pdo_driver.h"
@@ -572,7 +572,7 @@
                                snprintf(idxbuf, sizeof(idxbuf), tmpl, 
bind_no++);
                        } else {
                                memset(idxbuf, 0, sizeof(idxbuf));
-                               memcpy(idxbuf, p, sizeof(idxbuf));
+                               memcpy(idxbuf, p, strlen(p));
                                skip_map = 1;
                        }
 
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/pdo_sql_parser.re?r1=1.28.2.4.2.14&r2=1.28.2.4.2.15&diff_format=u
Index: php-src/ext/pdo/pdo_sql_parser.re
diff -u php-src/ext/pdo/pdo_sql_parser.re:1.28.2.4.2.14 
php-src/ext/pdo/pdo_sql_parser.re:1.28.2.4.2.15
--- php-src/ext/pdo/pdo_sql_parser.re:1.28.2.4.2.14     Thu Oct 23 18:56:05 2008
+++ php-src/ext/pdo/pdo_sql_parser.re   Thu Nov 13 13:09:47 2008
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_sql_parser.re,v 1.28.2.4.2.14 2008/10/23 18:56:05 felipe Exp $ */
+/* $Id: pdo_sql_parser.re,v 1.28.2.4.2.15 2008/11/13 13:09:47 felipe Exp $ */
 
 #include "php.h"
 #include "php_pdo_driver.h"
@@ -321,7 +321,7 @@
                                snprintf(idxbuf, sizeof(idxbuf), tmpl, 
bind_no++);
                        } else {
                                memset(idxbuf, 0, sizeof(idxbuf));
-                               memcpy(idxbuf, p, sizeof(idxbuf));
+                               memcpy(idxbuf, p, strlen(p));
                                skip_map = 1;
                        }
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to