Do not assume sqlite3_column_text is valid UTF-8.

Fix Statement::value_ref
This commit is contained in:
gwenn
2019-07-24 20:08:31 +02:00
parent bd5506899d
commit f0ae7b6e9b
5 changed files with 16 additions and 12 deletions

View File

@@ -216,7 +216,7 @@ impl InnerConnection {
pub fn prepare<'a>(&mut self, conn: &'a Connection, sql: &str) -> Result<Statement<'a>> {
let mut c_stmt = MaybeUninit::uninit();
let (c_sql, len, _) = str_for_sqlite(sql)?;
let (c_sql, len, _) = str_for_sqlite(sql.as_bytes())?;
let r = unsafe {
if cfg!(feature = "unlock_notify") {
let mut rc;