summaryrefslogtreecommitdiff
path: root/host/lib21/host_key.c
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib21/host_key.c')
-rw-r--r--host/lib21/host_key.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/host/lib21/host_key.c b/host/lib21/host_key.c
index 4acba9cb..78a6d2ec 100644
--- a/host/lib21/host_key.c
+++ b/host/lib21/host_key.c
@@ -270,7 +270,7 @@ int vb2_private_key_write(const struct vb2_private_key *key,
memcpy(buf, &pkey, sizeof(pkey));
/* strcpy() is ok here because we checked the length above */
- if (key->desc)
+ if (pkey.c.desc_size)
strcpy((char *)buf + pkey.c.fixed_size, key->desc);
if (rsabuf) {