[GRASS-SVN] r31980 - grass/branches/releasebranch_6_3/lib/db/dbmi_client

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 3 04:53:45 EDT 2008


Author: neteler
Date: 2008-07-03 04:53:45 -0400 (Thu, 03 Jul 2008)
New Revision: 31980

Modified:
   grass/branches/releasebranch_6_3/lib/db/dbmi_client/copy_tab.c
Log:
fix buffer overflow (merge from trunk)

Modified: grass/branches/releasebranch_6_3/lib/db/dbmi_client/copy_tab.c
===================================================================
--- grass/branches/releasebranch_6_3/lib/db/dbmi_client/copy_tab.c	2008-07-03 08:52:01 UTC (rev 31979)
+++ grass/branches/releasebranch_6_3/lib/db/dbmi_client/copy_tab.c	2008-07-03 08:53:45 UTC (rev 31980)
@@ -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