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

Stefano Sabatini git at videolan.org
Sat Dec 22 22:04:59 CET 2012


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Fri Dec 21 00:27:00 2012 +0100| [005b360b9c6948637efc55fd77bb6fa9f5d3c940] | committer: Stefano Sabatini

lavf/hlsenc: fix basename size computation off-by-one bug

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=005b360b9c6948637efc55fd77bb6fa9f5d3c940
---

 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;
 
     hls->number      = 0;
 



More information about the ffmpeg-cvslog mailing list