]> git.baikalelectronics.ru Git - uboot.git/commit
pxe: simplify label_boot()
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 15 Nov 2021 18:26:51 +0000 (19:26 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Mon, 18 Jul 2022 15:21:49 +0000 (17:21 +0200)
commit812748a9804d0eaca27186f2659e35a2a04d7905
treeaac6a821e06f8f567979e47314fba75f73430de1
parentc8018557a60796fb5b98efc5b3ed3e418a0a2350
pxe: simplify label_boot()

Coverity CID 131256 indicates a possible buffer overflow in label_boot().
This would only occur if the size of the downloaded file would exceed 4
GiB. But anyway we can simplify the code by using snprintf() and checking
the return value.

Addresses-Coverity-ID: 131256 ("Security best practices violations (STRING_OVERFLOW)")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Artem Lapkin <email2tema@gmail.com>
boot/pxe_utils.c