mirror of https://git.ffmpeg.org/ffmpeg.git
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:
parent
363e4f0810
commit
cbfd44a922
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue