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



commit 58da6667e0996c303c301e1d5b5f03e696995464
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]