avstrlcpy
av_strlcpy is a utility function found in FFmpeg’s libavutil library that provides a safe string-copy operation modeled after the BSD strlcpy function. It is used to copy a C string into a fixed-size destination buffer while minimizing the risk of buffer overflows.
The typical signature is: size_t av_strlcpy(char *dst, const char *src, size_t dst_size). The function copies up
Guidance and behavior: If dst_size is 0, av_strlcpy performs no writes but still returns the length of
Usage context: av_strlcpy is used throughout FFmpeg’s codebase to safely populate fixed-size buffers for messages, metadata,