diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2017-07-05 15:48:57 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2017-07-05 15:48:57 +0300 |
commit | 9091e746e52dd1b44d815f6e233fcbab2fa68b7c (patch) | |
tree | bc8f955633fe3e29f274fdfe3f43e66097535094 /gst/mxf | |
parent | bd8809f9d7aed89fc263d510d4180239930115ce (diff) | |
download | gstreamer-plugins-bad-9091e746e52dd1b44d815f6e233fcbab2fa68b7c.tar.gz |
mxfdemux: Fix integer overflow in partition position comparison function
Diffstat (limited to 'gst/mxf')
-rw-r--r-- | gst/mxf/mxfdemux.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index 62116e243..e87bf1b04 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -374,7 +374,12 @@ static gint gst_mxf_demux_partition_compare (GstMXFDemuxPartition * a, GstMXFDemuxPartition * b) { - return (a->partition.this_partition - b->partition.this_partition); + if (a->partition.this_partition < b->partition.this_partition) + return -1; + else if (a->partition.this_partition > b->partition.this_partition) + return 1; + else + return 0; } static GstFlowReturn |