[FFmpeg-cvslog] avformat/hlsenc: fix CID 1405135
Steven Liu
git at videolan.org
Fri Apr 28 05:20:12 EEST 2017
ffmpeg | branch: master | Steven Liu <lq at chinaffmpeg.org> | Fri Apr 28 10:18:44 2017 +0800| [cbfd44a9229cdead17c2857469ed1340615b3f36] | committer: Steven Liu
avformat/hlsenc: fix CID 1405135
Fixes Coverity CID: 1405135
Reviewed-by: Rodger Combs <rodger.combs at gmail.com>
Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cbfd44a9229cdead17c2857469ed1340615b3f36
---
libavformat/hlsenc.c | 8 ++++----
1 file 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) {
More information about the ffmpeg-cvslog
mailing list