DVD: segfault on double free in dvdnav

Description

Hi,

I noticed a segfault in dvdnav on one of my discs due to a double free when faulty country info is found in the parental management information description. Further investigation showed that this problem has already been fixed upstream (​http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/2010-November/001322.html) with SVN id 1220.
The attached patch is based on the upstream commit but fixes a tiny memory leak in the upstream version as well.

I'd like to ask you to apply the patch because currently trying to play the DVD kills the whole frontend. If you are planning a resync with upstream dvdnav anyway then the patch is not needed of course.

Martin, I'm preparing a resync, but if you want improvements to upstream included, I'll need you to get them committed there. We can't allow our source to diverge from upstream any more than necessary to support the myth protocol. Have you submitted these there yet? Erik Hovland from the dvdnav/read team is a Myth user.

This covers upstream SVN revisions 1216-1226. Covers the following changes:

libdvdnav:

Prevent abort if a menu doesn't exist.

Fix typos

Fix grammar in dvdnav.h

Fix typos in comments

libdvdread:

Provide BUP file support for more issues.

Mark a large number of functions not used outside of the file as static.

Fix some spelling issues

Move UDFReadBlocksRaw declaration to dvdread_internal.h.

Inhibit double free of parental management information

Replaces the hard-coded values (in parental management)

Report which index failed reading

Fixes #9828. The ticket contained a patch which purports to fix additional memory leaks in the upstream copy, but I'm going to insist that that patch be applied upstream first for my sanity's sake. Given the slow rate of change in libdvdnav and libdvdread, I am willing to perform a resync when pinged on this after it's committed there.

Tested this resync with local, disc, and myth:// playback of ISOs and DVDs.

I will try to get my change to the fix applied upstream. In case it is applied, I think there is no need for an immediate resync as it is rather minor.

Thanks for the quick reaction!

Add Comment

This ticket has been modified since you started editing. You should review the
other modifications which have been appended above,
and any conflicts shown in the preview below.
You can nevertheless proceed and submit your changes if you wish so.