[FFmpeg-devel] [PATCH] lavf/hlsenc: fix basename size computation off-by-one bug

Michael Niedermayer michaelni at gmx.at
Fri Dec 21 21:47:51 CET 2012


On Fri, Dec 21, 2012 at 12:29:56AM +0100, Stefano Sabatini wrote:
> ---
>  libavformat/hlsenc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c
> index d5058a1..07aa4ff 100644
> --- a/libavformat/hlsenc.c
> +++ b/libavformat/hlsenc.c
> @@ -178,7 +178,7 @@ static int hls_write_header(AVFormatContext *s)
>      int ret, i;
>      char *p;
>      const char *pattern = "%d.ts";
> -    int basename_size = strlen(s->filename) + strlen(pattern);
> +    int basename_size = strlen(s->filename) + strlen(pattern) + 1;

LGTM

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121221/e474c636/attachment.asc>


More information about the ffmpeg-devel mailing list