2017-04-26 16:43 GMT+08:00 Steven Liu <l...@chinaffmpeg.org>: > Fixes Coverity CID: 1405135 > > Signed-off-by: Steven Liu <l...@chinaffmpeg.org> > --- > libavformat/hlsenc.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c > index 3ec0f330fb..b7aafb73da 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) { > -- > 2.11.0 (Apple Git-81) > > > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >
Applied! Thanks _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel