summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Golle <[email protected]>2026-08-15 16:08:45 +0100
committerTom Rini <[email protected]>2026-08-24 09:19:03 -0600
commitfb79a4fcb09b49c6d6ef0a9a030e1abef32358e9 (patch)
tree5556a2c83cb0be4cdffdb0dd59f6d1ff3e02f445 /include
parent6073c36b2c8d39afe3ecc789b281667a3ddebc70 (diff)
disk: ubi: use a format string when copying the volume name
part_get_info_ubi() passes the UBI volume name straight to snprintf() as its format argument: snprintf(info->name, PART_NAME_LEN, vol->name); A volume name that contains a '%' is then interpreted as a printf conversion specifier, yielding a wrong partition name or reading unintended variadic arguments; a '%n' would be undefined behaviour. Volume names are user-defined and boot methods select images by volume name, so copy the name through a "%s" format instead. Fixes: aa5b67ce2262 ("disk: support UBI partitions") Signed-off-by: Daniel Golle <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions