[GRASS-SVN] r31976 - grass/trunk/lib/db/dbmi_client
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jul 3 03:48:27 EDT 2008
Author: neteler
Date: 2008-07-03 03:48:26 -0400 (Thu, 03 Jul 2008)
New Revision: 31976
Modified:
grass/trunk/lib/db/dbmi_client/copy_tab.c
Log:
fix buffer overflow (thanks to Glynn)
Modified: grass/trunk/lib/db/dbmi_client/copy_tab.c
===================================================================
--- grass/trunk/lib/db/dbmi_client/copy_tab.c 2008-07-02 22:55:47 UTC (rev 31975)
+++ grass/trunk/lib/db/dbmi_client/copy_tab.c 2008-07-03 07:48:26 UTC (rev 31976)
@@ -292,8 +292,9 @@
db_append_string ( &sql, "null" );
} else {
db_double_quote_string ( &value_string );
- sprintf (buf, "'%s'", db_get_string(&value_string) );
- db_append_string ( &sql, buf);
+ db_append_string ( &sql, "'");
+ db_append_string ( &sql, db_get_string(&value_string));
+ db_append_string ( &sql, "'");
}
break;
case DB_C_TYPE_INT:
More information about the grass-commit
mailing list