diff options
Diffstat (limited to 'host/lib/host_signature2.c')
-rw-r--r-- | host/lib/host_signature2.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/host/lib/host_signature2.c b/host/lib/host_signature2.c index c5b2c466..b81428d0 100644 --- a/host/lib/host_signature2.c +++ b/host/lib/host_signature2.c @@ -154,8 +154,7 @@ int vb2_sign_data(struct vb2_signature2 **sig_ptr, } /* Allocate signature buffer and copy header */ - buf = malloc(s.c.total_size); - memset(buf, 0, s.c.total_size); + buf = calloc(1, s.c.total_size); memcpy(buf, &s, sizeof(s)); /* strcpy() is ok because we allocated buffer based on desc length */ |