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

Stefano Sabatini stefasab at gmail.com
Sat Dec 22 22:05:31 CET 2012


On date Friday 2012-12-21 21:47:51 +0100, Michael Niedermayer encoded:
> 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

Applied.
-- 
FFmpeg = Fundamentalist and Fundamentalist Moronic Patchable Embarassing Gladiator


More information about the ffmpeg-devel mailing list