mirror of https://github.com/mirror/busybox.git
Merge 56c36f1aa1
into 371fe9f71d
commit
cb44106680
|
@ -13,7 +13,7 @@ char* FAST_FUNC safe_strncpy(char *dst, const char *src, size_t size)
|
|||
{
|
||||
if (!size) return dst;
|
||||
dst[--size] = '\0';
|
||||
return strncpy(dst, src, size);
|
||||
return strncpy(dst, src, --size);
|
||||
}
|
||||
|
||||
/* Like strcpy but can copy overlapping strings. */
|
||||
|
|
Loading…
Reference in New Issue