Browse Source

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

tags/n0.9
Carl Eugen Hoyos 14 years ago
parent
commit
4eb86d348f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/cafdec.c

+ 1
- 1
libavformat/cafdec.c View File

@@ -125,7 +125,7 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size)
st->codec->extradata = av_mallocz(ALAC_HEADER + FF_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
return AVERROR(ENOMEM);
strcpy(st->codec->extradata, "\0\0\0\24alac");
memcpy(st->codec->extradata, "\0\0\0\24alac", 8);
avio_read(pb, st->codec->extradata + ALAC_HEADER - ALAC_NEW_KUKI, ALAC_NEW_KUKI);
st->codec->extradata_size = ALAC_HEADER;
} else {


Loading…
Cancel
Save