We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f5d3f1 commit 2f27a07Copy full SHA for 2f27a07
source/secure_number.cpp
@@ -80,7 +80,8 @@ static int set_number(uint32_t number)
80
uvisor_box_namespace(id, name, sizeof(name));
81
/* We only trust client a. */
82
static const char * trusted_namespace = "client_a";
83
- if (memcmp(name, trusted_namespace, sizeof(*trusted_namespace)) == 0) {
+ size_t trusted_namespace_length = strlen(trusted_namespace);
84
+ if (memcmp(name, trusted_namespace, trusted_namespace_length + 1) == 0) {
85
uvisor_ctx->trusted_id = id;
86
} else {
87
return 1;
0 commit comments