After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785991 - rtpstats: fix unsigned integer comparisons.
rtpstats: fix unsigned integer comparisons.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other All
: Normal normal
: 1.12.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-08-08 11:15 UTC by Mathieu Duponchelle
Modified: 2017-08-17 10:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
rtpstats: fix unsigned integer comparisons. (2.22 KB, patch)
2017-08-08 11:15 UTC, Mathieu Duponchelle
none Details | Review
rtpstats: fix unsigned integer comparisons. (2.19 KB, patch)
2017-08-08 11:25 UTC, Mathieu Duponchelle
committed Details | Review

Description Mathieu Duponchelle 2017-08-08 11:15:33 UTC
Callers of the API (rtpsource, rtpjitterbuffer) pass clock_rate
as a signed integer, and the comparison "<= 0" is used against
it, leading me to think the intention was to have the field
be typed as gint32, not guint32.

This led to situations where we could call scale_int with
a MAX_UINT32 (-1) guint32 as the denom, thus raising an
assertion.
Comment 1 Mathieu Duponchelle 2017-08-08 11:15:39 UTC
Created attachment 357184 [details] [review]
rtpstats: fix unsigned integer comparisons.
Comment 2 Mathieu Duponchelle 2017-08-08 11:25:25 UTC
Created attachment 357185 [details] [review]
rtpstats: fix unsigned integer comparisons.

Callers of the API (rtpsource, rtpjitterbuffer) pass clock_rate
as a signed integer, and the comparison "<= 0" is used against
it, leading me to think the intention was to have the field
be typed as gint32, not guint32.

This led to situations where we could call scale_int with
a MAX_UINT32 (-1) guint32 as the denom, thus raising an
assertion.
Comment 3 Mathieu Duponchelle 2017-08-11 11:31:02 UTC
Attachment 357185 [details] pushed as 5e48e85 - rtpstats: fix unsigned integer comparisons.
Comment 4 Sebastian Dröge (slomo) 2017-08-11 12:04:59 UTC
Also for 1.12?
Comment 5 Mathieu Duponchelle 2017-08-11 12:24:27 UTC
Well a commit was actually backported there that prevents the problem from happening (c9465db1b73432a92f49f59911219aed60a11407), once the conflict was resolved what this commit did was simply making things a bit more consistent, so I don't think backporting this is needed