Permalink
Browse files

file metadata: Verify that metadata strings are UTF-8 before importin…

…g them.

Fixes #584
  • Loading branch information...
1 parent acb67ec commit 9924de5785c83f8f7dd57042f68a1e308b6fdbc7 @andoma committed Jun 30, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/fileaccess/fa_probe.c
@@ -220,6 +220,9 @@ ffmpeg_metadata_get(AVMetadata *m, const char *key)
if((tag = av_metadata_get(m, key, NULL, AV_METADATA_IGNORE_SUFFIX)) == NULL)
return NULL;
+ if(!utf8_verify(tag->value))
+ return NULL;
+
str = tag->value;
len = strlen(str);
ret = rstr_allocl(str, len);

0 comments on commit 9924de5

Please sign in to comment.