3 回答
TA贡献1780条经验 获得超3个赞
strlcpy
strncpy
strncpy
strcpy
strncpy
str...
strncpy
strncpy
strcpy
strlcpy
strlcpy
strlcpy
strncat
strcat
strncat
. strlcat
strcat
TA贡献1871条经验 获得超8个赞
if (destlen + sourcelen > dest_maxlen){ /* Bug out */}
strlcat
if (strlcat(dest, source, dest_bufferlen) >= dest_bufferlen){ /* Bug out */}
destlen
sourcelen
strlcat
memcpy
if (destlen + sourcelen > dest_maxlen){ goto error_out;}memcpy(dest + destlen, source, sourcelen + 1);destlen += sourcelen;
dest_maxlen
dest
dest
dest_bufferlen
dest buffer
).
添加回答
举报