]> git.baikalelectronics.ru Git - uboot.git/commit
disk: efi: buffer overflow in part_get_info_efi()
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Fri, 5 Jul 2019 19:27:13 +0000 (21:27 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sat, 6 Jul 2019 19:25:31 +0000 (21:25 +0200)
commit7a46bda7e11c9926ab81c2f17458f03d5a5dfc49
treebb2d16029c7425f2314ec2dee3d5c17f4c3b84d7
parente9efd9e269c7546d693264a94a8983d38c31fbca
disk: efi: buffer overflow in part_get_info_efi()

In part_get_info_efi() we use the output of print_efiname() to set
info->name[]. The size of info->name is PART_NAME_LEN = 32 but
print_efiname() returns a string with a maximum length of
PARTNAME_SZ + 1 = 37.

Use snprintf() instead of sprintf() to avoid buffer overflow.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
disk/part_efi.c