[tracker/dbus-fd-experiment] Steroids tests: ensure strings are null terminated



commit 5c07d945951f83fa56dcc5bbe4c4b058112f897a
Author: Adrien Bustany <abustany gnome org>
Date:   Thu Jun 3 18:05:13 2010 -0400

    Steroids tests: ensure strings are null terminated

 tests/tracker-steroids/tracker-test.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/tests/tracker-steroids/tracker-test.c b/tests/tracker-steroids/tracker-test.c
index ccdb7be..6d1796a 100644
--- a/tests/tracker-steroids/tracker-test.c
+++ b/tests/tracker-steroids/tracker-test.c
@@ -305,6 +305,7 @@ test_tracker_sparql_update_fast_large ()
 
 	lotsOfA = g_malloc (LONG_NAME_SIZE);
 	memset (lotsOfA, 'a', LONG_NAME_SIZE);
+	lotsOfA[LONG_NAME_SIZE-1] = '\0';
 
 	query = g_strdup_printf (query_template, lotsOfA);
 
@@ -359,6 +360,7 @@ test_tracker_sparql_update_blank_fast_large ()
 
 	lotsOfA = g_malloc (LONG_NAME_SIZE);
 	memset (lotsOfA, 'a', LONG_NAME_SIZE);
+	lotsOfA[LONG_NAME_SIZE-1] = '\0';
 
 	query = g_strdup_printf (query_template, lotsOfA);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]