[Libav-user] Info regarding API clip_interval

Stefano Sabatini stefasab at gmail.com
Sun Feb 2 11:19:52 CET 2014


In data Sunday 2014-02-02 12:02:03 +0530, anshul ha scritto:
> On 02/02/2014 11:52 AM, anshul wrote:
> >Hi guys
> >
> >In file libavfilter/drawutils.c there is a function called clip_interval
> >
> > static void clip_interval(int wmax, int *x, int *w, int *dx)
> >what does the parameter means over here, means what is x  and what is w
> >wmax  is understood to me.
> >
> >I came over here, since valgrind showed me that I am using
> >uninitialized memory.
> >
> >Thanks
> >Anshul
> 
> 
> Hi
> 
> In source code there is reallocation of memory
> 
>  935     if ((len = s->expanded_text.len) > s->nb_positions) {
>  936         if (!(s->positions =
>  937               av_realloc(s->positions, len*sizeof(*s->positions))))
>  938             return AVERROR(ENOMEM);
>  939         s->nb_positions = len;
> 
> and I didn't found any initialization of positions, and we are using
> uninitialized position
> in clip filter.
> 
> would it be ok to initialize just after allocating the memory.

Please repost the mail to ffmpeg-devel, even better if you have a
patch to fix the issue (assuming it's not a false positive).


More information about the Libav-user mailing list