Commit 018eb2c1 authored by reimar's avatar reimar

Add warnings to av_strlcat and av_strlcpy doxygen that the input strings

already must be properly 0-terminated strings, unlike strncpy it
can not be use on raw data read from a file.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@19800 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent f85e04ce
......@@ -56,6 +56,10 @@ int av_stristart(const char *str, const char *pfx, const char **ptr);
* @param src source string
* @param size size of destination buffer
* @return the length of src
*
* WARNING: since the return value is the length of src, src absolutely
* _must_ be a properly 0-terminated string, otherwise this will read beyond
* the end of the buffer and possibly crash.
*/
size_t av_strlcpy(char *dst, const char *src, size_t size);
......@@ -70,6 +74,10 @@ size_t av_strlcpy(char *dst, const char *src, size_t size);
* @param src source string
* @param size size of destination buffer
* @return the total length of src and dst
*
* WARNING: since the return value use the length of src and dst, these absolutely
* _must_ be a properly 0-terminated strings, otherwise this will read beyond
* the end of the buffer and possibly crash.
*/
size_t av_strlcat(char *dst, const char *src, size_t size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment