[PATCH] uninitialized variable in src/tds/query.c:tds_put_data

"Craig A. Berry" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
There's a debug message here that's going to print garbage because  
it's using the value of an automatic variable that has not been  
initialized.  The attached patch replaces that variable (colsize) with  
what I believe is the intended item (curcol->column_cur_size).
________________________________________
Craig A. Berry
mailto:[email protected]

"... getting out of a sonnet is much more
  difficult than getting in."
                  Brad Leithauser

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
tds_put_data.patch (application/octet-stream, 484 B)
--- src/tds/query.c;-0	2009-03-06 14:18:51 -0600
+++ src/tds/query.c	2009-03-18 19:24:22 -0500
@@ -1450,7 +1450,7 @@ tds_put_data(TDSSOCKET * tds, TDSCOLUMN 
 	CHECK_TDS_EXTRA(tds);
 	CHECK_COLUMN_EXTRA(curcol);
 
-	tdsdump_log(TDS_DBG_INFO1, "tds_put_data: colsize = %d\n", (int) colsize);
+	tdsdump_log(TDS_DBG_INFO1, "tds_put_data: colsize = %d\n", (int) curcol->column_cur_size);
 
 	if (curcol->column_cur_size < 0) {
 		tdsdump_log(TDS_DBG_INFO1, "tds_put_data: null param\n");
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.