Author: wyoung
Date: Fri Jun 22 23:47:24 2007
New Revision: 1597

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1597&view=rev
Log:
Found yet another use of c_str() where we should be using data() to
avoid the possibilty of truncating a buffer containing nulls by treating
it as a C string.

Modified:
    trunk/lib/row.cpp

Modified: trunk/lib/row.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/row.cpp?rev=1597&r1=1596&r2=1597&view=diff
==============================================================================
--- trunk/lib/row.cpp (original)
+++ trunk/lib/row.cpp Fri Jun 22 23:47:24 2007
@@ -74,7 +74,7 @@
 {
        if (initialized_) {
                const std::string& s = data_.at(i);
-               return ColData(s.c_str(), s.length(), res_->types(i),
+               return ColData(s.data(), s.length(), res_->types(i),
                                is_nulls_[i]);
        }
        else {


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to