avformat/rpl: Replace strcpy with av_strlcpy

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 94d45a13c7)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Cameron Cawley
2019-07-10 10:27:02 +02:00
committed by Michael Niedermayer
parent 08d3cc2f1d
commit 7c1b403365

View File

@@ -192,7 +192,7 @@ static int rpl_read_header(AVFormatContext *s)
ast->codecpar->channels = read_line_and_int(pb, &error); // number of audio channels ast->codecpar->channels = read_line_and_int(pb, &error); // number of audio channels
error |= read_line(pb, line, sizeof(line)); error |= read_line(pb, line, sizeof(line));
ast->codecpar->bits_per_coded_sample = read_int(line, &endptr, &error); // audio bits per sample ast->codecpar->bits_per_coded_sample = read_int(line, &endptr, &error); // audio bits per sample
strcpy(audio_type, endptr); av_strlcpy(audio_type, endptr, RPL_LINE_LENGTH);
// At least one sample uses 0 for ADPCM, which is really 4 bits // At least one sample uses 0 for ADPCM, which is really 4 bits
// per sample. // per sample.
if (ast->codecpar->bits_per_coded_sample == 0) if (ast->codecpar->bits_per_coded_sample == 0)