[Approved] - Overflow in DVBSubtiles decoder on small packets

Discussion in 'Submit: code patches (MediaPortal/TV-Server/etc.)' started by thecode, May 16, 2013.

  1. thecode

    thecode Portal Member

    Joined:
    March 4, 2011
    Messages:
    9
    Likes Received:
    3
    Ratings:
    +4 / 0
    Home Country:
    Israel Israel
    Hi,
    I've noticed that under certain situations when a small PES packet is assembled (size less than 188 bytes) the DVB subtitles decoder will overflow, eventually crashing MP.
    This packets are not regular DVB subtitle packets, but they exists in some DVB streams.
    Tested on my machine.
    Thanks.


     

    Attached Files:

    • Like Like x 1
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. Holzi
    • Team MediaPortal

    Holzi Super Moderator

    Joined:
    April 21, 2010
    Messages:
    7,928
    Likes Received:
    1,591
    Gender:
    Male
    Location:
    Ba-Wü
    Ratings:
    +2,228 / 8
    Home Country:
    Germany Germany
    Show System Specs
    @tourettes you may have any idea about this? :)
     
  4. tourettes
    • Premium Supporter

    tourettes Retired Team Member

    Joined:
    January 7, 2005
    Messages:
    17,301
    Likes Received:
    4,595
    Ratings:
    +4,810 / 3
    Sorry for the slow response.

    Does those less than 188 byte packets contain padding?
     
    • Like Like x 1
  5. thecode

    thecode Portal Member

    Joined:
    March 4, 2011
    Messages:
    9
    Likes Received:
    3
    Ratings:
    +4 / 0
    Home Country:
    Israel Israel
    Yes, the length field in the packet header declares a small size (e.g. 10 bytes).
    Looking at the data the bytes declared by the length have data and the rest is padded by zeros.
    I assume this packets are used to signal a special overlay icon on the DVB receiver.
    anyway since the original code calculation always expects a packet longer than 188 bytes (which is usually the case for subtitle frames) the comparison in the code bellow will never get true:
    Code (Text):
    1. if ( m_iPesLength == m_iWritePos  ) // we have the expected data
     
    • Like Like x 1
  6. thecode

    thecode Portal Member

    Joined:
    March 4, 2011
    Messages:
    9
    Likes Received:
    3
    Ratings:
    +4 / 0
    Home Country:
    Israel Israel
    Hi,
    Is there any way to move forward with this bug fix.
    Many users in our community have to update the "DVBSub3.ax" manually after each release to prevent MP from crashing.
    The patch only fix a bug and will not do anything to the code flow for users which are not affected by it.
    Thanks
     
    Last edited: February 23, 2014
  7. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,275
    Likes Received:
    6,223
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,235 / 9
    Home Country:
    France France
    Show System Specs
    Thanks for reminder, do we have a jira for this ?
    We need to setup Jira + branch othervise it will get lost :)
    @HomeY i tag you because you have skill with Jira :)
     
  8. HomeY
    • Team MediaPortal

    HomeY Test Group

    Joined:
    February 23, 2008
    Messages:
    6,460
    Likes Received:
    2,627
    Gender:
    Male
    Occupation:
    Network Engineer
    Location:
    ::1
    Ratings:
    +4,737 / 16
    Home Country:
    Netherlands Netherlands
    Show System Specs
    MP1-4402: Overflow in DVBSubtiles decoder on small packets

    @thecode Could you create a new patch? It fails (probably because of (recent) changes).
     
    Last edited: February 23, 2014
    • Thank You! Thank You! x 1
  9. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,275
    Likes Received:
    6,223
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,235 / 9
    Home Country:
    France France
    Show System Specs
    Patch added to the branch :)
     
    • Thank You! Thank You! x 1
  10. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,275
    Likes Received:
    6,223
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,235 / 9
    Home Country:
    France France
    Show System Specs
    • Thank You! Thank You! x 2
  11. Sebastiii
    • Team MediaPortal

    Sebastiii Development Group

    Joined:
    November 12, 2007
    Messages:
    16,275
    Likes Received:
    6,223
    Gender:
    Male
    Location:
    France
    Ratings:
    +10,235 / 9
    Home Country:
    France France
    Show System Specs
    @thecode :)
    If no testing -> will not be include in next final release.
     
    • Agree Agree x 1
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!