[FFmpeg-cvslog] lavf: fix null pointer dereference in rdt

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Nov 4 16:43:57 CET 2011


On Thu, Nov 03, 2011 at 10:50:18PM +0100, Michael Niedermayer wrote:
> ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Nov  3 22:38:10 2011 +0100| [bb99ae3ae924c942a634bec7711ec7ee11c38eb9] | committer: Michael Niedermayer
> 
> lavf: fix null pointer dereference in rdt
> 
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> 
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bb99ae3ae924c942a634bec7711ec7ee11c38eb9
> ---
> 
>  libavformat/utils.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 855992e..4399176 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -607,6 +607,9 @@ static int init_input(AVFormatContext *s, const char *filename)
>      int ret;
>      AVProbeData pd = {filename, NULL, 0};
>  
> +    if(s->iformat && !strlen(filename))
> +        return 0;

How can a 0 length string cause a NULL dereference?
Also, there is no rdt probe function, so do you mean rtsp?
That one uses av_strstart, but that would only crash if filename
was NULL - but in that case strlen could crash just as well
(the standard does not require it to work with NULL).


More information about the ffmpeg-cvslog mailing list