wez             Mon Jul 18 23:39:50 2005 EDT

  Modified files:              
    /php-src/ext/pdo_odbc       odbc_stmt.c 
  Log:
  Limit the size of columns to 64K, so we don't try to allocate 2GB for each 
text
  column coming out of informix.
  
  Refs Bug #33533.
  
  Not totally closed yet; still need to cater for text fields longer than 64k 
in a sane manner.
  
  
  
http://cvs.php.net/diff.php/php-src/ext/pdo_odbc/odbc_stmt.c?r1=1.23&r2=1.24&ty=u
Index: php-src/ext/pdo_odbc/odbc_stmt.c
diff -u php-src/ext/pdo_odbc/odbc_stmt.c:1.23 
php-src/ext/pdo_odbc/odbc_stmt.c:1.24
--- php-src/ext/pdo_odbc/odbc_stmt.c:1.23       Sat Jul  9 01:01:14 2005
+++ php-src/ext/pdo_odbc/odbc_stmt.c    Mon Jul 18 23:39:49 2005
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: odbc_stmt.c,v 1.23 2005/07/09 05:01:14 wez Exp $ */
+/* $Id: odbc_stmt.c,v 1.24 2005/07/19 03:39:49 wez Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -386,6 +386,12 @@
                return 0;
        }
 
+       /* enforce a practical limitation.
+        * TODO: make this work more nicely */
+       if (colsize > 65535) {
+               colsize = 65535;
+       }
+
        col->maxlen = S->cols[colno].datalen = colsize;
        col->namelen = colnamelen;
        col->name = estrdup(S->cols[colno].colname);

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

Reply via email to