mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
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:
parent
4dd1a6b173
commit
854a9d8132
2 changed files with 10 additions and 1 deletions
|
@ -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):
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue