[FFmpeg-cvslog] lavf: block special characters in dump metadata

Michael Niedermayer git at videolan.org
Wed Aug 8 21:17:44 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Aug  8 21:13:15 2012 +0200| [b615dbb319fc1748af6ea0ac95b5f89e03c5de0e] | committer: Michael Niedermayer

lavf: block special characters in dump metadata

This is limited to the chars that arent filtered by av_log() already
we might filter more aggressively if theres some case where this becomes
needed.

Fixes Ticket1181

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/utils.c b/libavformat/utils.c
index be86a87..f55e1e6 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3812,7 +3812,7 @@ static void dump_metadata(void *ctx, AVDictionary *m, const char *indent)
                 av_log(ctx, AV_LOG_INFO, "%s  %-16s: ", indent, tag->key);
                 while(*p) {
                     char tmp[256];
-                    size_t len = strcspn(p, "\xd\xa");
+                    size_t len = strcspn(p, "\x8\xa\xb\xc\xd");
                     av_strlcpy(tmp, p, FFMIN(sizeof(tmp), len+1));
                     av_log(ctx, AV_LOG_INFO, "%s", tmp);
                     p += len;



More information about the ffmpeg-cvslog mailing list