avformat/rpl: Replace strcpy with av_strlcpy
authorCameron Cawley <ccawley2011@gmail.com>
Wed, 10 Jul 2019 08:27:02 +0000 (10:27 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 10 Jul 2019 10:54:57 +0000 (12:54 +0200)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/rpl.c

index 17b45e3..6afd373 100644 (file)
@@ -200,7 +200,7 @@ static int rpl_read_header(AVFormatContext *s)
         ast->codecpar->channels        = read_line_and_int(pb, &error);  // number of audio channels
         error |= read_line(pb, line, sizeof(line));
         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
         // per sample.
         if (ast->codecpar->bits_per_coded_sample == 0)