mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-29 19:50:40 +00:00
qtmux: gst_qtmux_check_difference verify before subtract
Avoid negative overflow by checking the order of operands on subtraction of unsigned integers. https://bugzilla.gnome.org/show_bug.cgi?id=635878
This commit is contained in:
parent
7e8081c89e
commit
0930f0645f
1 changed files with 1 additions and 1 deletions
|
@ -1904,7 +1904,7 @@ static gboolean inline
|
|||
gst_qtmux_check_difference (GstQTMux * qtmux, GstClockTime a,
|
||||
GstClockTime b, GstClockTime magn)
|
||||
{
|
||||
return ((a - b >= (magn >> 1)) || (b - a >= (magn >> 1)));
|
||||
return ((a >= b) ? (a - b >= (magn >> 1)) : (b - a >= (magn >> 1)));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue