tracker r3144 - in trunk: . src/libtracker-db



Author: carlosg
Date: Fri Mar 27 14:08:45 2009
New Revision: 3144
URL: http://svn.gnome.org/viewvc/tracker?rev=3144&view=rev

Log:
2009-03-27  Carlos Garnacho  <carlos imendio com>

        * src/libtracker-db/tracker-db-index.c (indexer_update_word): Do not
        try to memmove() past array boundaries when removing an element.

Modified:
   trunk/ChangeLog
   trunk/src/libtracker-db/tracker-db-index.c

Modified: trunk/src/libtracker-db/tracker-db-index.c
==============================================================================
--- trunk/src/libtracker-db/tracker-db-index.c	(original)
+++ trunk/src/libtracker-db/tracker-db-index.c	Fri Mar 27 14:08:45 2009
@@ -700,7 +700,7 @@
 				if (score < 1) {
 					/* Shift all subsequent records in array down one place */
 					g_memmove (&previous_hits[center], &previous_hits[center + 1],
-						   (old_hit_count - center) * sizeof (TrackerDBIndexItem));
+						   (old_hit_count - center - 1) * sizeof (TrackerDBIndexItem));
 					old_hit_count--;
 				} else {
 					guint32 service_type;



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