[FFmpeg-devel] initializing re allocated memory in drawtext filter

anshul anshul.ffmpeg at gmail.com
Sun Feb 2 14:25:54 CET 2014


On 02/02/2014 06:18 PM, Nicolas George wrote:
> Le quartidi 14 pluviôse, an CCXXII, anshul a écrit :
>> take the case of clip_interval(int wmax, int *x, int *w, int *dx)
>> if memset is not done then x contain undefined value, if that
>> undefined value is 0 or make greater the
>> whole comparison greater then wmax
>>
>> here is code for quick reference
>> 289     if (dx)
>> 290         *dx = 0;
>> 291     if (*x < 0) {
>> 292         if (dx)
>> 293             *dx = -*x;
>> 294         *w += *x;
>> 295         *x = 0;
>> 296     }
>> 297     if (*x + *w > wmax)
>> 298         *w = wmax - *x;
>> over here x is used uninitialized
> x is an argument of the function; if it is passer uninitialized, the culprit
> is the caller, not clip_interval().
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
I am unable to reproduce that same valgrind report that was generated in 
morning
so till I or someone else again encounter the same problem lets make 
this patch invalid
sorry guys


More information about the ffmpeg-devel mailing list