[vlc-devel] commit: Cosmetics. (Laurent Aimar )
Laurent Aimar
fenrir at via.ecp.fr
Wed Feb 25 09:16:45 CET 2009
On Wed, Feb 25, 2009, Rémi Denis-Courmont wrote:
>
> On Tue, 24 Feb 2009 23:44:56 +0100 (CET), git at videolan.org (git version
> control) wrote:
> > - *pp_sectors = malloc( (i_tracks + 1) * sizeof(int) );
> > + *pp_sectors = malloc( (i_tracks + 1) * sizeof(**pp_sectors)
> > );
> > if( *pp_sectors == NULL )
> > return 0;
> > memcpy( *pp_sectors, p_vcddev->p_sectors,
> > - (i_tracks + 1) * sizeof(int) );
> > + (i_tracks + 1) * sizeof(**pp_sectors) );
>
> How big can i_tracks be, and can we read it from a disk image? It looks
> like an integer overflow, but then again not if i_tracks is 16 bits.
Mmh, i_tracks is probably limited to 99 (cd-audio) but I will verify.
Besides a calloc here make more sense (I will do it and any needed checks).
--
fenrir
More information about the vlc-devel
mailing list