diff options
author | Andre Przywara <andre.przywara@arm.com> | 2019-01-29 09:25:14 +0000 |
---|---|---|
committer | Andre Przywara <andre.przywara@arm.com> | 2019-01-29 09:25:14 +0000 |
commit | e56b8dc82bba526348fc7b1d2f615c8452caf21a (patch) | |
tree | b513d432af1db8aec69bc371a2796edbd2cc53cf | |
parent | e9b77791ab11b25391ef758d41a39584d14ff2e9 (diff) | |
download | arm-trusted-firmware-e56b8dc82bba526348fc7b1d2f615c8452caf21a.tar.gz |
tools/fiptool: Fix UUID parsing in blob handling
Commit 033648652f ("Make TF UUID RFC 4122 compliant") changed the scanf
parsing string to handle endianness correctly.
However that changed the number of items sscanf handles, without
adjusting the sanity check just below.
Increase the expected return value from 11 to 16 to let fiptool handle
UUIDs given as blob parameters correctly again.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-rw-r--r-- | tools/fiptool/fiptool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/fiptool/fiptool.c b/tools/fiptool/fiptool.c index 0d4f929bb..80b498e47 100644 --- a/tools/fiptool/fiptool.c +++ b/tools/fiptool/fiptool.c @@ -271,10 +271,10 @@ static void uuid_from_str(uuid_t *u, const char *s) &u->node[2], &u->node[3], &u->node[4], &u->node[5]); /* - * Given the format specifier above, we expect 11 items to be scanned + * Given the format specifier above, we expect 16 items to be scanned * for a properly formatted UUID. */ - if (n != 11) + if (n != 16) log_errx("Invalid UUID: %s", s); } |