avformat/nutdec: Fix use of uinitialized value
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 12 May 2015 16:20:23 +0000 (18:20 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Jun 2015 00:13:11 +0000 (02:13 +0200)
Fixes CID1041175

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 56abf35151c635caa3eb04bbb90454bae5463a09)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/nutdec.c

index 961f76c..b1bbcb9 100644 (file)
@@ -501,6 +501,8 @@ static int decode_info_header(NUTContext *nut)
     for (i = 0; i < count; i++) {
         get_str(bc, name, sizeof(name));
         value = get_s(bc);
+        str_value[0] = 0;
+
         if (value == -1) {
             type = "UTF-8";
             get_str(bc, str_value, sizeof(str_value));