Browse code

Do not use strcpy for "strings" starting with \0.

Carl Eugen Hoyos authored on 2011/11/04 04:19:43
Showing 1 changed files
... ...
@@ -125,7 +125,7 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size)
125 125
             st->codec->extradata = av_mallocz(ALAC_HEADER + FF_INPUT_BUFFER_PADDING_SIZE);
126 126
             if (!st->codec->extradata)
127 127
                 return AVERROR(ENOMEM);
128
-            strcpy(st->codec->extradata, "\0\0\0\24alac");
128
+            memcpy(st->codec->extradata, "\0\0\0\24alac", 8);
129 129
             avio_read(pb, st->codec->extradata + ALAC_HEADER - ALAC_NEW_KUKI, ALAC_NEW_KUKI);
130 130
             st->codec->extradata_size = ALAC_HEADER;
131 131
         } else {