tony2001                Thu Jan 18 15:29:11 2007 UTC

  Modified files:              
    /php-src/ext/interbase      ibase_query.c 
  Log:
  use snprintf()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/interbase/ibase_query.c?r1=1.28&r2=1.29&diff_format=u
Index: php-src/ext/interbase/ibase_query.c
diff -u php-src/ext/interbase/ibase_query.c:1.28 
php-src/ext/interbase/ibase_query.c:1.29
--- php-src/ext/interbase/ibase_query.c:1.28    Mon Jan  1 09:29:24 2007
+++ php-src/ext/interbase/ibase_query.c Thu Jan 18 15:29:11 2007
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: ibase_query.c,v 1.28 2007/01/01 09:29:24 sebastian Exp $ */
+/* $Id: ibase_query.c,v 1.29 2007/01/18 15:29:11 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1933,7 +1933,7 @@
        add_index_stringl(return_value, 2, var->relname, var->relname_length, 
1);
        add_assoc_stringl(return_value, "relation", var->relname, 
var->relname_length, 1);
 
-       len = sprintf(buf, "%d", var->sqllen);
+       len = snprintf(buf, 16, "%d", var->sqllen);
        add_index_stringl(return_value, 3, buf, len, 1);
        add_assoc_stringl(return_value, "length", buf, len, 1);
 
@@ -1952,7 +1952,7 @@
                                precision = 18;
                                break;
                }
-               len = sprintf(buf, "NUMERIC(%d,%d)", precision, -var->sqlscale);
+               len = snprintf(buf, 16, "NUMERIC(%d,%d)", precision, 
-var->sqlscale);
                add_index_stringl(return_value, 4, s, len, 1);
                add_assoc_stringl(return_value, "type", s, len, 1);
        } else {

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

Reply via email to