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

Diego Biurrun diego at biurrun.de
Sun Jul 10 17:42:05 CEST 2011


On Sun, Jul 10, 2011 at 11:20:49AM +0200, Dominik 'Rathann' Mierzejewski wrote:
> 
> 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.

Diego


More information about the DVDnav-discuss mailing list