Unfortunately strlcpy (3) and strlcat (3) aren't universally available in the standard libraries of UNIX-like systems.
遗憾的是,strlcpy(3)和strlcat(3)并不是在类unix系统的标准库中普遍可用。
The OpenBSD developers have developed a different static approach based on new functions they developed, strlcpy(3) and strlcat(3).
OpenBSD开发人员开发了一种不同的静态方法,这种方法基于他们开发的新函数strlcpy(3)和strlcat(3) 。
Then, we'll discuss two examples of the static approach (standard C strncpy/strncat and OpenBSD's strlcpy/strlcat), followed by two examples of the dynamic approach (SafeStr and C++'s std::string).
然后,我们将讨论静态方法的两个例子(标准Cstrncpy/strncat和OpenBSD 的strlcpy/strlcat ),接着讨论动态方法的两个例子(SafeStr 和 C++ 的std::string )。
Then, we'll discuss two examples of the static approach (standard C strncpy/strncat and OpenBSD's strlcpy/strlcat), followed by two examples of the dynamic approach (SafeStr and C++'s std::string).
然后,我们将讨论静态方法的两个例子(标准Cstrncpy/strncat和OpenBSD 的strlcpy/strlcat ),接着讨论动态方法的两个例子(SafeStr 和 C++ 的std::string )。
应用推荐