[DVDnav-discuss] [PATCH] libdvdread: Fix crash when PTT is too short

Erik Hovland erik at hovland.org
Sun Jul 10 20:38:04 CEST 2011


>> I assume that sizeof(uint32_t) comes from a few lines above:
>>
>> data = (uint32_t *)malloc(info_length);
>
> Note that this malloc cast is both ugly and unnecessary, this is not C++.
> malloc() returns void*, which is compatible with any pointer type.

In an attempt to address both Diego and Rathann's comments, I have put together
these 4 patches. Let me know what you think.

Thanks

E

-- 
Erik Hovland
erik at hovland.org
http://hovland.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Clean-up-malloc-call.patch
Type: text/x-patch
Size: 712 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/attachments/20110710/2b3c2fcf/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Clean-up-the-error-path-of-ifoRead_VTS.patch
Type: text/x-patch
Size: 3593 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/attachments/20110710/2b3c2fcf/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Conditional-formatting-changes.patch
Type: text/x-patch
Size: 1144 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/attachments/20110710/2b3c2fcf/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Check-the-size-of-the-PTT-against-what-is-referenced.patch
Type: text/x-patch
Size: 1260 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/dvdnav-discuss/attachments/20110710/2b3c2fcf/attachment-0003.bin>


More information about the DVDnav-discuss mailing list