summaryrefslogtreecommitdiff
path: root/gst/mxf
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2017-07-05 15:48:57 +0300
committerSebastian Dröge <sebastian@centricular.com>2017-07-05 15:48:57 +0300
commit9091e746e52dd1b44d815f6e233fcbab2fa68b7c (patch)
treebc8f955633fe3e29f274fdfe3f43e66097535094 /gst/mxf
parentbd8809f9d7aed89fc263d510d4180239930115ce (diff)
downloadgstreamer-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.c7
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