[FFmpeg-devel] Patch to fix RTMP URI parsing

Anders Rein are at vizrt.com
Wed Oct 16 15:51:10 CEST 2013


On 10/16/2013 02:45 PM, Lukaz M wrote:
> On 16 October 2013 14:28, Anders Rein <are at vizrt.com  <http://ffmpeg.org/mailman/listinfo/ffmpeg-devel>> wrote:
>
> >/  When parsing RTMP URI, ffmpeg concatenates a string after allocating it
> />/  with av_malloc before setting the first character to zero. Valgrind shows
> />/  this as "conditional jump or move depends on uninitialised value(s)". On
> />/  some systems (like mine), this can cause random ascii characters in the
> />/  filename being sendt to the RTMP streaming server.
> />/
> />/  This patch fixes this problem.
> />/
> />/  --- a/libavformat/rtmpproto.c
> /+++ b/libavformat/rtmpproto.c
> @@ -2506,6 +2506,7 @@ reconnect:
>               ret = AVERROR(ENOMEM);
>               goto fail;
>           }
> +        rt->playpath[0] = '\0'
>
> missing semicolon at the end of the line.
> Looks like last else statement below can be removed too.
Oh!Embarrassing... Sorry about that. Here is a fixed patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Initialize-playpath-to-0-in-rtmpproto-to-avoid-trash.patch
Type: text/x-patch
Size: 1046 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131016/1ed2f12c/attachment.bin>


More information about the ffmpeg-devel mailing list