fastboot: Fix off by 1 error
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Thu, 17 Jul 2025 08:43:29 +0000 (09:43 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 22 Jul 2025 17:30:14 +0000 (11:30 -0600)
commit23d2c182d4be9f993a4e4d8f4fc6293e4d5a9ff8
tree56ac634aaf9c6e681f2077f4cbf4a16f99366fc2
parentafca60620ad7958fbee2d5518de0383483c82ced
fastboot: Fix off by 1 error

strlen only reports length of string not including terminating 0 byte
but this has to be included in length of receiving buffer on copy so
adjust length check to be correct.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
drivers/fastboot/fb_command.c