mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 09:54:35 +00:00
efi_loader: size of media device path node represenation
In the format specifier we want to specify the maximum width in case an ending \0 is missing. So slen must be used as precision and not as field width. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
8300be612c
commit
0741226f65
1 changed files with 1 additions and 1 deletions
|
@ -153,7 +153,7 @@ static char *dp_media(char *s, struct efi_device_path *dp)
|
|||
struct efi_device_path_file_path *fp =
|
||||
(struct efi_device_path_file_path *)dp;
|
||||
int slen = (dp->length - sizeof(*dp)) / 2;
|
||||
s += sprintf(s, "/%-*ls", slen, fp->str);
|
||||
s += sprintf(s, "/%-.*ls", slen, fp->str);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
Loading…
Add table
Reference in a new issue