char *BUF_strdup(const char *str);
/*
- * Returns a pointer to a new string which is a duplicate of the string |str|,
- * but guarantees to never read past the first |siz| bytes of |str|.
+ * Like strndup, but in addition, explicitly guarantees to never read past the
+ * first |siz| bytes of |str|.
*/
char *BUF_strndup(const char *str, size_t siz);