summaryrefslogtreecommitdiffstats
path: root/app/sql/statement.cc
diff options
context:
space:
mode:
authordhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-16 20:34:05 +0000
committerdhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-16 20:34:05 +0000
commit3ddbd145ccbf4cd58e70f6594cdcce1f46999367 (patch)
tree09207df887079c200dd7f1d53cc67ac7fe1b383e /app/sql/statement.cc
parentbff894af676ffdcfce8a2b9a2ecfc3006b41d014 (diff)
downloadchromium_src-3ddbd145ccbf4cd58e70f6594cdcce1f46999367.zip
chromium_src-3ddbd145ccbf4cd58e70f6594cdcce1f46999367.tar.gz
chromium_src-3ddbd145ccbf4cd58e70f6594cdcce1f46999367.tar.bz2
Fix to AutoFill sql Crash Report
Fix for Crash Report: http://go/crash/reportdetail?reportid=7ea9ff0f4697aa57 The AutoFill sql assertion logic was constructing an std::string from 0 when invalid data was encountered. This caused a c++ exception and then program termination. Correct logic is to return empty string. Note, this fix does not address the underlying database corruption, only the crash. BUG=38241 TEST=none Review URL: http://codereview.chromium.org/1016004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41757 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/sql/statement.cc')
-rw-r--r--app/sql/statement.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/sql/statement.cc b/app/sql/statement.cc
index d143524..9f1d85a 100644
--- a/app/sql/statement.cc
+++ b/app/sql/statement.cc
@@ -176,7 +176,7 @@ double Statement::ColumnDouble(int col) const {
std::string Statement::ColumnString(int col) const {
if (!is_valid()) {
NOTREACHED();
- return 0;
+ return "";
}
const char* str = reinterpret_cast<const char*>(
sqlite3_column_text(ref_->stmt(), col));