fastboot: fix partition name truncation in environment lookup
authorMatthias Schiffer <matthias.schiffer@ew.tq-group.com>
Fri, 30 Jul 2021 12:23:54 +0000 (14:23 +0200)
committerTom Rini <trini@konsulko.com>
Tue, 12 Oct 2021 20:48:38 +0000 (16:48 -0400)
commit5f9338ad56e6b1168905e73ecfcd5e1b7b1a32e2
tree184249a4abc8d83ac446fc66eb237c0f7b3c067b
parent776bf6a5457eb0c61c367d1ee7e45733a1c72ed6
fastboot: fix partition name truncation in environment lookup

strlcat() need to be passed the full buffer length. The incorrect call
caused truncation of partition names for fastboot_raw_partition_... and
fastboot_partition_alias_... env lookup to much less than PART_NAME_LEN.

Fixes: 69a752983171 ("fastboot: Fix possible buffer overrun")
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
drivers/fastboot/fb_mmc.c