[MPlayer-users] segfault on Alpha in libmpdemux/demux_mov.c

Ivan Kalvachev ivan at cacad.com
Wed Mar 3 02:27:30 CET 2004


Andrew A. Gill said:
> On Tue, 2 Mar 2004, Andrew A. Gill wrote:
>
>> I'm getting a segfault on a DEC Alpha with the Sorenson codec.
>>
>> I've traced the issue to the following line:
>>
>> 	trak->chunks=realloc(trak->chunks,sizeof(mov_chunk_t)*len);
>
> More info.  at the line directly above this one,
> 	trak->chunks = 0
> 	sizeof(mov_chunk_t) = 24
> 	len =  368
>
> Now, I'm not entirely sure, but isn't the first argument of
> realloc() supposed to be a pointer?  And isn't  not in
> userspace?
0 probably meen the special pointer NULL;
If i remember right realloc may take pointer NULL as input,
it which case it will (m)alloc the data with the given len.
(just like features of using realloc as free() if size=0 is given)
I suppose that the system library doesn't do that.
So make an check for NULL pointer and malloc it.

This is what I can say without looking how this stuff works.

Best regards
  Ivan Kalvachev
 iive




More information about the MPlayer-users mailing list