mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 22:51:37 +00:00
net: xilinx_ll_temac: Fix string overflow
Size of this snprintf "lltemac.%lx" is bigger than 16 characters. Replacing it with "ll_tem.%lx" Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
7e5281fee4
commit
21909baf57
1 changed files with 2 additions and 1 deletions
|
@ -303,7 +303,8 @@ int xilinx_ll_temac_initialize(bd_t *bis, struct ll_temac_info *devinf)
|
||||||
if (devinf->devname) {
|
if (devinf->devname) {
|
||||||
strncpy(dev->name, devinf->devname, sizeof(dev->name));
|
strncpy(dev->name, devinf->devname, sizeof(dev->name));
|
||||||
} else {
|
} else {
|
||||||
snprintf(dev->name, sizeof(dev->name), "lltemac.%lx", devinf->base_addr);
|
snprintf(dev->name, sizeof(dev->name), "ll_tem.%lx",
|
||||||
|
devinf->base_addr);
|
||||||
devinf->devname = dev->name;
|
devinf->devname = dev->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue