]> git.ipfire.org Git - thirdparty/u-boot.git/commit
cmd: gpt: Fix off by 1 errors
authorAndrew Goodbody <andrew.goodbody@linaro.org>
Wed, 16 Jul 2025 10:55:47 +0000 (11:55 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 23 Jul 2025 23:37:08 +0000 (17:37 -0600)
commit25d3e0509c7d812e05d21c2c73038dce6fe9d889
treeb72d9385b00bfba7aa713780e42b4adc9a651f0a
parentd29c1092ebe113d31bc95792644350592d1211ff
cmd: gpt: Fix off by 1 errors

The buffer for a name to be copied into must also contain the
terminating 0 byte but strlen returns the length of the string without
counting that 0 byte. Adjust the length checks to take this into
account.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
cmd/gpt.c