[tracker/tracker-1.2] libtracker-data: Guard against invalid statements in public API
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-1.2] libtracker-data: Guard against invalid statements in public API
- Date: Mon, 13 Oct 2014 13:56:57 +0000 (UTC)
commit 33d11ac7f2de221104d223139e5e40e3f8f8b4ec
Author: Debarshi Ray <debarshir gnome org>
Date: Mon Oct 13 14:27:07 2014 +0200
libtracker-data: Guard against invalid statements in public API
https://bugzilla.gnome.org/show_bug.cgi?id=738450
src/libtracker-data/tracker-db-interface-sqlite.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-db-interface-sqlite.c
b/src/libtracker-data/tracker-db-interface-sqlite.c
index ee531c9..749a8d5 100644
--- a/src/libtracker-data/tracker-db-interface-sqlite.c
+++ b/src/libtracker-data/tracker-db-interface-sqlite.c
@@ -2339,6 +2339,7 @@ void
tracker_db_statement_execute (TrackerDBStatement *stmt,
GError **error)
{
+ g_return_if_fail (TRACKER_IS_DB_STATEMENT (stmt));
g_return_if_fail (!stmt->stmt_is_sunk);
execute_stmt (stmt->db_interface, stmt->stmt, NULL, error);
@@ -2348,6 +2349,7 @@ TrackerDBCursor *
tracker_db_statement_start_cursor (TrackerDBStatement *stmt,
GError **error)
{
+ g_return_val_if_fail (TRACKER_IS_DB_STATEMENT (stmt), NULL);
g_return_val_if_fail (!stmt->stmt_is_sunk, NULL);
return tracker_db_cursor_sqlite_new (stmt->stmt, stmt, NULL, 0, NULL, 0, FALSE);
@@ -2362,6 +2364,7 @@ tracker_db_statement_start_sparql_cursor (TrackerDBStatement *stmt,
gboolean threadsafe,
GError **error)
{
+ g_return_val_if_fail (TRACKER_IS_DB_STATEMENT (stmt), NULL);
g_return_val_if_fail (!stmt->stmt_is_sunk, NULL);
return tracker_db_cursor_sqlite_new (stmt->stmt, stmt, types, n_types, variable_names,
n_variable_names, threadsafe);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]