[PATCH 31/42] mkfs.ubifs: Accept 0x prefix for key descriptor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: David Oberhollenzer <david.oberhollenzer@xxxxxxxxxxxxx>

Signed-off-by: David Oberhollenzer <david.oberhollenzer@xxxxxxxxxxxxx>
Signed-off-by: Richard Weinberger <richard@xxxxxx>
---
 ubifs-utils/mkfs.ubifs/fscrypt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ubifs-utils/mkfs.ubifs/fscrypt.c b/ubifs-utils/mkfs.ubifs/fscrypt.c
index 6d1fa4ba9d3f..02132e205a35 100644
--- a/ubifs-utils/mkfs.ubifs/fscrypt.c
+++ b/ubifs-utils/mkfs.ubifs/fscrypt.c
@@ -165,6 +165,9 @@ static int parse_key_descriptor(const char *desc, __u8 *dst)
 {
 	int i, hi, lo;
 
+	if (desc[0] == '0' && (desc[1] == 'x' || desc[1] == 'X'))
+		desc += 2;
+
 	for (i = 0; i < FS_KEY_DESCRIPTOR_SIZE; ++i) {
 		if (!desc[i * 2] || !desc[i * 2 + 1]) {
 			err_msg("key descriptor '%s' is too short", desc);
-- 
2.19.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux