aboutsummaryrefslogtreecommitdiff
path: root/test/py
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-09-02 09:35:23 +0200
committerTom Rini <trini@konsulko.com>2023-09-11 16:31:25 -0400
commit69f4d37302583c3a2c8445ff69826c52c6fce7e3 (patch)
treea76787982bb806876a37d156dc6f0d784628185c /test/py
parent396f315520bcbcc2b710ab696326b239577c1ad2 (diff)
cmd: gpt: fix calc_parts_list_len()
* Avoid incrementing by moving comma into strlen("uuid_disk=,") and considering NUL byte. * Appending a UUID only adds UUID_STR_LEN bytes. Don't count the terminating NUL. * The length of the hexadecimal representation of lba_int is 2 * sizeof(lba_int). * We don't use a 'MiB' postfix but a '0x' prefix. * The uuid field is only needed if configured. Fixes: 2fcaa413b3f6 ("gpt: harden set_gpt_info() against non NULL-terminated strings") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'test/py')
0 files changed, 0 insertions, 0 deletions