find_info_tag: Make sure the output buffer is null terminated
authorMartin Storsjö <martin@martin.st>
Tue, 5 Oct 2010 19:33:56 +0000 (19:33 +0000)
committerMartin Storsjö <martin@martin.st>
Tue, 5 Oct 2010 19:33:56 +0000 (19:33 +0000)
Originally committed as revision 25353 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavformat/utils.c

index 5985511..a545a5d 100644 (file)
@@ -3361,8 +3361,8 @@ int find_info_tag(char *arg, int arg_size, const char *tag1, const char *info)
                 }
                 p++;
             }
-            *q = '\0';
         }
+        *q = '\0';
         if (!strcmp(tag, tag1))
             return 1;
         if (*p != '&')