gst/gstindex.c: Fix overflows in comparison code. (bug #142819)

Original commit message from CVS:
* gst/gstindex.c: (gst_index_compare_func): Fix overflows in
comparison code.  (bug #142819)
This commit is contained in:
David Schleef 2004-05-20 19:32:34 +00:00
parent 4dd1a6b173
commit 854a9d8132
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2004-05-20 David Schleef <ds@schleef.org>
* gst/gstindex.c: (gst_index_compare_func): Fix overflows in
comparison code. (bug #142819)
2004-05-20 Wim Taymans <wim@fluendo.com>
* gst/gstbuffer.c: (gst_buffer_default_copy):

View file

@ -741,7 +741,11 @@ gst_index_add_object (GstIndex * index, gint id, gchar * key,
static gint
gst_index_compare_func (gconstpointer a, gconstpointer b, gpointer user_data)
{
return (gint) a - (gint) b;
if (a < b)
return -1;
if (a > b)
return 1;
return 0;
}
/**