Commit cbfd44a9 authored by Steven Liu's avatar Steven Liu

avformat/hlsenc: fix CID 1405135

Fixes Coverity CID: 1405135
Reviewed-by: 's avatarRodger Combs <rodger.combs@gmail.com>
Signed-off-by: 's avatarSteven Liu <lq@chinaffmpeg.org>
parent 363e4f08
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment