From 3ddbd145ccbf4cd58e70f6594cdcce1f46999367 Mon Sep 17 00:00:00 2001 From: "dhollowa@chromium.org" Date: Tue, 16 Mar 2010 20:34:05 +0000 Subject: 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 --- app/sql/statement.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/sql') 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( sqlite3_column_text(ref_->stmt(), col)); -- cgit v1.1