* grub-core/fs/ext2.c (grub_ext2_read_symlink): Use memcpy rather
strncpy. * grub-core/fs/jfs.c (grub_jfs_lookup_symlink): Likewise. * grub-core/kern/misc.c (grub_strncpy): Move from here ... * include/grub/misc.h (grub_strncpy): ... to here. Make inline. * grub-core/net/net.c (grub_net_addr_to_str): Use COMPILE_TIME_ASSERT + strcpy rather than strncpy.
This commit is contained in:
parent
8fbe5c7df7
commit
eb03ede014
6 changed files with 29 additions and 19 deletions
|
@ -734,8 +734,8 @@ grub_net_addr_to_str (const grub_net_network_level_address_t *target, char *buf)
|
|||
switch (target->type)
|
||||
{
|
||||
case GRUB_NET_NETWORK_LEVEL_PROTOCOL_DHCP_RECV:
|
||||
/* TRANSLATORS: it refers to the network address. */
|
||||
grub_strncpy (buf, "temporary", GRUB_NET_MAX_STR_ADDR_LEN);
|
||||
COMPILE_TIME_ASSERT (sizeof ("temporary") < GRUB_NET_MAX_STR_ADDR_LEN);
|
||||
grub_strcpy (buf, "temporary");
|
||||
return;
|
||||
case GRUB_NET_NETWORK_LEVEL_PROTOCOL_IPV6:
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue