summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/image-sig.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/image-sig.c b/common/image-sig.c
index 5a269d3289..5d860e1266 100644
--- a/common/image-sig.c
+++ b/common/image-sig.c
@@ -334,6 +334,11 @@ int fit_config_check_sig(const void *fit, int noffset, int required_keynode,
return -1;
}
+ if (prop && prop_len > 0 && prop[prop_len - 1] != '\0') {
+ *err_msgp = "hashed-nodes property must be null-terminated";
+ return -1;
+ }
+
/* Add a sanity check here since we are using the stack */
if (count > IMAGE_MAX_HASHED_NODES) {
*err_msgp = "Number of hashed nodes exceeds maximum";