From b610e77fd24f9cb8beceff9c9bd4328e5a8b6e77 Mon Sep 17 00:00:00 2001 From: Greg Kaiser Date: Fri, 9 Feb 2018 09:19:54 -0800 Subject: [PATCH] cryptfs: Fix format string Test: None Change-Id: Id16acb4ed5e89e759b69ec2d2f2db54cc54f1959 --- cryptfs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptfs.cpp b/cryptfs.cpp index 4e163bc..8ffe1a7 100644 --- a/cryptfs.cpp +++ b/cryptfs.cpp @@ -2685,7 +2685,7 @@ int cryptfs_setfield(const char *fieldname, const char *value) } for (field_id = 1; field_id < num_entries; field_id++) { - snprintf(temp_field, sizeof(temp_field), "%s_%d", fieldname, field_id); + snprintf(temp_field, sizeof(temp_field), "%s_%u", fieldname, field_id); if (persist_set_key(temp_field, value + field_id * (PROPERTY_VALUE_MAX - 1), encrypted)) { // fail to set key, should not happen as we have already checked the available space.