Index: cvs/gnome2/glib/glib/gqsort.c
===================================================================
RCS file: /cvs/gnome/glib/glib/gqsort.c,v
retrieving revision 1.6
diff -u -r1.6 gqsort.c
--- cvs/gnome2/glib/glib/gqsort.c	4 Dec 2002 01:27:43 -0000	1.6
+++ cvs/gnome2/glib/glib/gqsort.c	7 Nov 2003 04:58:11 -0000
@@ -260,11 +260,11 @@
     run_ptr = base_ptr + size;
     while ((run_ptr += size) <= end_ptr)
       {
-	tmp_ptr = run_ptr - size;
-	while ((*compare_func)
+	tmp_ptr = run_ptr - size;			  
+	while (((*compare_func)
 	       ((void *) run_ptr, (void *) tmp_ptr,
-		user_data) < 0)
-	  tmp_ptr -= size;
+		user_data) < 0) && (tmp_ptr > base_ptr)) /* Make sure that it doesn't go below base_ptr */
+	  tmp_ptr -= size;                            
 
 	tmp_ptr += size;
 	if (tmp_ptr != run_ptr)
