[tracker/binary-log-2: 19/38] libtracker-db: Add more checks to tracker_db_journal_append_*
- From: Jürg Billeter <juergbi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/binary-log-2: 19/38] libtracker-db: Add more checks to tracker_db_journal_append_*
- Date: Tue, 12 Jan 2010 14:35:59 +0000 (UTC)
commit f37bc2dcb293a41c44f3029f48d6b3f4b21cc632
Author: Jürg Billeter <j bitron ch>
Date: Wed Jan 6 15:10:56 2010 +0100
libtracker-db: Add more checks to tracker_db_journal_append_*
src/libtracker-db/tracker-db-journal.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-db/tracker-db-journal.c b/src/libtracker-db/tracker-db-journal.c
index b679bdb..aa33e53 100644
--- a/src/libtracker-db/tracker-db-journal.c
+++ b/src/libtracker-db/tracker-db-journal.c
@@ -328,6 +328,9 @@ tracker_db_journal_append_delete_statement (guint32 s_id,
gint size;
g_return_val_if_fail (writer.journal > 0, FALSE);
+ g_return_val_if_fail (s_id > 0, FALSE);
+ g_return_val_if_fail (p_id > 0, FALSE);
+ g_return_val_if_fail (object != NULL, FALSE);
o_len = strlen (object);
df = DATA_FORMAT_OPERATION_DELETE;
@@ -356,6 +359,9 @@ tracker_db_journal_append_delete_statement_id (guint32 s_id,
gint size;
g_return_val_if_fail (writer.journal > 0, FALSE);
+ g_return_val_if_fail (s_id > 0, FALSE);
+ g_return_val_if_fail (p_id > 0, FALSE);
+ g_return_val_if_fail (o_id > 0, FALSE);
df = DATA_FORMAT_OPERATION_DELETE | DATA_FORMAT_OBJECT_ID;
size = sizeof (guint32) * 4;
@@ -383,6 +389,9 @@ tracker_db_journal_append_insert_statement (guint32 s_id,
gint size;
g_return_val_if_fail (writer.journal > 0, FALSE);
+ g_return_val_if_fail (s_id > 0, FALSE);
+ g_return_val_if_fail (p_id > 0, FALSE);
+ g_return_val_if_fail (object != NULL, FALSE);
o_len = strlen (object);
df = 0x00;
@@ -410,6 +419,9 @@ tracker_db_journal_append_insert_statement_id (guint32 s_id,
gint size;
g_return_val_if_fail (writer.journal > 0, FALSE);
+ g_return_val_if_fail (s_id > 0, FALSE);
+ g_return_val_if_fail (p_id > 0, FALSE);
+ g_return_val_if_fail (o_id > 0, FALSE);
df = DATA_FORMAT_OBJECT_ID;
size = sizeof (guint32) * 4;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]