iliaa           Tue Sep 28 10:07:23 2004 EDT

  Modified files:              
    /php-src/ext/mssql  php_mssql.c 
  Log:
  Fixed bug #30224 (Sybase date strings are sometimes not null terminated).
  
  
http://cvs.php.net/diff.php/php-src/ext/mssql/php_mssql.c?r1=1.138&r2=1.139&ty=u
Index: php-src/ext/mssql/php_mssql.c
diff -u php-src/ext/mssql/php_mssql.c:1.138 php-src/ext/mssql/php_mssql.c:1.139
--- php-src/ext/mssql/php_mssql.c:1.138 Mon Jul 19 03:19:39 2004
+++ php-src/ext/mssql/php_mssql.c       Tue Sep 28 10:07:23 2004
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_mssql.c,v 1.138 2004/07/19 07:19:39 andi Exp $ */
+/* $Id: php_mssql.c,v 1.139 2004/09/28 14:07:23 iliaa Exp $ */
 
 #ifdef COMPILE_DL_MSSQL
 #define HAVE_MSSQL 1
@@ -862,6 +862,7 @@
 
                                        res_buf = (unsigned char *) 
emalloc(res_length+1);
                                        res_length = 
dbconvert(NULL,coltype(offset),dbdata(mssql_ptr->link,offset), res_length, 
SQLCHAR,res_buf,-1);
+                                       res_buf[res_length] = '\0';
                                } else {
                                        if (column_type == SQLDATETIM4) {
                                                DBDATETIME temp;
@@ -931,7 +932,7 @@
                        
                        res_buf = (unsigned char *) emalloc(res_length+1);
                        res_length = 
dbconvert(NULL,coltype(offset),dbdata(mssql_ptr->link,offset), res_length, SQLCHAR, 
res_buf, -1);
-
+                       res_buf[res_length] = '\0';
                } else {
                        if (column_type == SQLDATETIM4) {
                                DBDATETIME temp;

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

Reply via email to