mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
ownSql: Always use SQLITE_TRANSIENT
More safe.
This commit is contained in:
parent
707d6880a8
commit
2d420cd72c
@ -192,7 +192,7 @@ void SqlQuery::bindValue(int pos, const QVariant& value)
|
||||
// lifetime of string == lifetime of its qvariant
|
||||
const QString *str = static_cast<const QString*>(value.constData());
|
||||
res = sqlite3_bind_text16(_stmt, pos, str->utf16(),
|
||||
(str->size()) * sizeof(QChar), SQLITE_STATIC);
|
||||
(str->size()) * sizeof(QChar), SQLITE_TRANSIENT);
|
||||
} else {
|
||||
// unbound value create a null entry.
|
||||
res = SQLITE_OK;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user