Browse Source

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@gmx.at>
tags/n1.0
Michael Niedermayer 13 years ago
parent
commit
b615dbb319
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/utils.c

+ 1
- 1
libavformat/utils.c View File

@@ -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); av_log(ctx, AV_LOG_INFO, "%s %-16s: ", indent, tag->key);
while(*p) { while(*p) {
char tmp[256]; 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_strlcpy(tmp, p, FFMIN(sizeof(tmp), len+1));
av_log(ctx, AV_LOG_INFO, "%s", tmp); av_log(ctx, AV_LOG_INFO, "%s", tmp);
p += len; p += len;


Loading…
Cancel
Save