diff options
author | Steven Liu <lq@chinaffmpeg.org> | 2017-04-28 05:18:44 +0300 |
---|---|---|
committer | Steven Liu <lq@chinaffmpeg.org> | 2017-04-28 05:18:44 +0300 |
commit | cbfd44a9229cdead17c2857469ed1340615b3f36 (patch) | |
tree | 05a1bd45377e5b49c32fbc5a835b4a084766e935 /libavformat | |
parent | 363e4f0810d4085bbee3dced41a2de2d2c135dca (diff) |
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>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/hlsenc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 3ec0f330fb..221089c1be 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -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) { |