u-boot/arch/powerpc/cpu/mpc85xx
Vladimir Oltean fca315a382 arch: powerpc: mpc85xx: ensure mdiodev->name is NULL terminated after MDIO_NAME_LEN truncation
strncpy() simply bails out when copying a source string whose size
exceeds the destination string size, potentially leaving the destination
string unterminated.

One possible way to address is to pass MDIO_NAME_LEN - 1 and a
previously zero-initialized destination string, but this is more
difficult to maintain.

The chosen alternative is to use strlcpy(), which properly limits the
copy len in the (srclen >= size) case to "size - 1", and which is also
more efficient than the strncpy() byte-by-byte implementation by using
memcpy. The destination string returned by strlcpy() is always NULL
terminated.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2021-09-28 18:50:56 +03:00
..
b4860_ids.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
b4860_serdes.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bsc9132_serdes.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
c29x_serdes.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cmd_errata.c command: Remove the cmd_tbl_t typedef 2020-05-18 18:36:55 -04:00
commproc.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
config.mk mpc85xx: Add support for -msingle-pic-base 2019-01-23 10:48:48 -08:00
cpu.c ppc: Remove MPC8555CDS boards 2021-07-07 19:52:23 -04:00
cpu_init.c common: board_r: Drop initr_secondary_cpu wrapper 2021-01-15 14:36:11 -05:00
cpu_init_early.c ppc: mpc85xx: Wrap LAW related codes with CONFIG_FSL_LAW 2021-03-05 10:25:42 +05:30
ether_fcc.c arch: powerpc: mpc85xx: ensure mdiodev->name is NULL terminated after MDIO_NAME_LEN truncation 2021-09-28 18:50:56 +03:00
fdt.c ppc: Remove T4160RDB board 2021-07-07 19:52:24 -04:00
fsl_corenet2_serdes.c ppc: Remove T4160RDB board 2021-07-07 19:52:24 -04:00
fsl_corenet2_serdes.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
fsl_corenet_serdes.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
fsl_corenet_serdes.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
interrupts.c common: Drop asm/ptrace.h from common header 2020-05-18 21:19:23 -04:00
Kconfig ppc: Remove UCP1020 board 2021-09-13 18:22:50 -04:00
liodn.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
Makefile pci: powerpc: Drop old code 2021-08-05 16:14:36 -04:00
mp.c global: Convert simple_strtoul() with hex to hextoul() 2021-08-02 13:32:14 -04:00
mp.h powerpc/mpc85xx: Rewrite spin table to comply with ePAPR v1.1 2012-10-22 14:31:32 -05:00
mpc8536_serdes.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
mpc8544_serdes.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
mpc8548_serdes.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
p1010_serdes.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
p1021_serdes.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
p1023_serdes.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
p2020_serdes.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
p2041_ids.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
p2041_serdes.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
p3041_ids.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
p3041_serdes.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
p4080_ids.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
p4080_serdes.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
p5040_ids.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
p5040_serdes.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
portals.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
qe_io.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
release.S powerpc: mpc85xx: Improve Work-around for Erratum A005125 2018-05-09 09:17:51 -05:00
resetvec.S Move arch/ppc to arch/powerpc 2010-04-21 23:42:38 +02:00
serial_scc.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
speed.c ppc: Remove T4160RDB board 2021-07-07 19:52:24 -04:00
spl_minimal.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
start.S ppc: Remove MPC8569MDS board 2021-02-25 11:59:54 -05:00
t1024_ids.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
t1024_serdes.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
t1040_ids.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
t1040_serdes.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
t2080_ids.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
t2080_serdes.c ppc: Remove T2081QDS board and ARCH_T2081 support 2021-04-10 08:04:42 -04:00
t4240_ids.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
t4240_serdes.c ppc: Remove T4160RDB board 2021-07-07 19:52:24 -04:00
tlb.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
traps.c common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
u-boot-nand.lds powerpc/dts: Define '_end' symbol in mpc85xx U-Boot lds files 2018-09-27 10:13:24 -07:00
u-boot-nand_spl.lds powerpc/dts: Define '_end' symbol in mpc85xx U-Boot lds files 2018-09-27 10:13:24 -07:00
u-boot-spl.lds linker: Modify linker scripts to be more generic 2019-01-26 22:55:53 -05:00
u-boot.lds powerpc/dts: Define '_end' symbol in mpc85xx U-Boot lds files 2018-09-27 10:13:24 -07:00