1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/hlsenc: fix CID 1405135

Fixes Coverity CID: 1405135

Reviewed-by: Rodger Combs <rodger.combs@gmail.com>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
This commit is contained in:
Steven Liu 2017-04-28 10:18:44 +08:00
parent 363e4f0810
commit cbfd44a922

View File

@ -394,11 +394,11 @@ static int do_encrypt(AVFormatContext *s)
av_strlcat(hls->key_basename, ".key", len);
if (hls->key_url) {
strncpy(hls->key_file, hls->key_url, sizeof(hls->key_file));
strncpy(hls->key_uri, hls->key_url, sizeof(hls->key_uri));
av_strlcpy(hls->key_file, hls->key_url, sizeof(hls->key_file));
av_strlcpy(hls->key_uri, hls->key_url, sizeof(hls->key_uri));
} else {
strncpy(hls->key_file, hls->key_basename, sizeof(hls->key_file));
strncpy(hls->key_uri, hls->key_basename, sizeof(hls->key_uri));
av_strlcpy(hls->key_file, hls->key_basename, sizeof(hls->key_file));
av_strlcpy(hls->key_uri, hls->key_basename, sizeof(hls->key_uri));
}
if (!*hls->iv_string) {