| * these functions are just very basic wrappers around exiting ones and |
| * do not offer the protection that might be expected against buffer |
| * snprint() is a real basic wrapper around the standard sprintf() |
| * without any bounds checking |
| snprintf(char *str, size_t size, const char *format, ...) |
| return vsprintf (str, format, args); |
| * strlcpy is a safer version of strncpy(), checking the total |
| strlcpy(char *dst, const char *src, size_t size) |
| * strlcat is a safer version of strncat(), checking the total |
| strlcat(char *dst, const char *src, size_t size) |
| /* strncpy(dst, src, size - strlen(dst)); */ |
| /* I've just added below code only for workable under Linux. So |
| need rewrite -- Kunihiro. */ |
| if (strlen (dst) + strlen (src) >= size) |