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 750869 - dashdemux: assertion raised if profiles information is not provided
dashdemux: assertion raised if profiles information is not provided
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-06-12 16:41 UTC by Florin Apostol
Modified: 2015-10-29 11:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to fail the MPD parsing if profiles attribute is not provided (2.21 KB, patch)
2015-06-12 16:41 UTC, Florin Apostol
none Details | Review
do not dereference profiles if absent (1.15 KB, patch)
2015-09-11 10:01 UTC, Vincent Penquerc'h
committed Details | Review
Florin's unit test, with swapped error code (1.54 KB, patch)
2015-09-11 10:02 UTC, Vincent Penquerc'h
committed Details | Review

Description Florin Apostol 2015-06-12 16:41:28 UTC
Created attachment 305165 [details] [review]
patch to fail the MPD parsing if profiles attribute is not provided

g_strstr_len called from gst_mpd_client_check_profiles will raise an assert
if profiles information was not provided:

g_strstr_len: assertion 'haystack != NULL' failed

Profiles is a mandatory attribute of the MPD and validation should fail if it is not provided.
Comment 1 Sebastian Dröge (slomo) 2015-06-12 20:54:51 UTC
Comment on attachment 305165 [details] [review]
patch to fail the MPD parsing if profiles attribute is not provided

Can we in theory work if no profile was provided, is there some sane default value we could use? If it's not too much effort we should try to handle malformed streams.
Comment 2 Vincent Penquerc'h 2015-09-11 10:01:17 UTC
Created attachment 311125 [details] [review]
do not dereference profiles if absent

Absent profiles are ignored here (and profiles are currently ignored in the rest of the code already).
Comment 3 Vincent Penquerc'h 2015-09-11 10:02:17 UTC
Created attachment 311126 [details] [review]
Florin's unit test, with swapped error code

Error code is swapped because no profile is now OK.
Comment 4 Vincent Penquerc'h 2015-10-29 11:02:41 UTC
commit 5c8f7021166ba582eaf0cbca50e49d9e814b14a6
Author: Vincent Penquerc'h <vincent.penquerch@collabora.co.uk>
Date:   Fri Sep 11 10:57:26 2015 +0100

    mpdparser: do not dereference profiles is absent
    
    These are used to apply restrictions on what the MPD file may
    use, so no profile means no restrictions.
    
    Besides, nothing actually uses the profiles (yet) anyway.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=750869
Comment 5 Vincent Penquerc'h 2015-10-29 11:04:07 UTC
As well as:

commit 84ff565c887b1d2df956328a4ae4ec19b2fdb4ee
Author: Florin Apostol <florin.apostol@oregan.net>
Date:   Fri Sep 11 10:59:15 2015 +0100

    dashdemux: unit test for missing profiles