[FFmpeg-devel] [PATCH v2] avformat/hls: use av_strlcopy instead of strncpy

Leo Izen leo.izen at gmail.com
Sun Oct 29 14:49:02 EET 2023


On 10/29/23 08:47, Leo Izen wrote:
> Avoids a -Wstringop-truncation warning by using av_strlcopy instead of
> strncpy.
> 

Changes from v1:

- changed the length attribute, so now it has similar semantics to earlier.

This patch has the same semantics with regard to the null-termination 
and the length of the string. However, it avoids a compiler warning 
because the compiler thinks strncpy is unsafe.

- Leo Izen


More information about the ffmpeg-devel mailing list