From 63ad591e5983503fefa00ed0488b0bfd74b2a80d Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 7 Aug 2018 18:07:56 +0200 Subject: [PATCH] blob_buf needs to be zero'd Fixes weird segfaults when compiling libubox with GCC 8. Signed-off-by: Daniel Golle --- ucert.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ucert.c b/ucert.c index 6cdc220..53a1a05 100644 --- a/ucert.c +++ b/ucert.c @@ -183,7 +183,7 @@ static int cert_load(const char *certfile, struct list_head *chain) { static int cert_append(const char *certfile, const char *sigfile) { FILE *fs; char filebuf[CERT_BUF_LEN]; - struct blob_buf sigbuf; + struct blob_buf sigbuf = {0}; int len; int ret; @@ -406,8 +406,8 @@ static int cert_dump(const char *certfile) { /* issue an auth certificate for pubkey */ static int cert_issue(const char *certfile, const char *pubkeyfile, const char *seckeyfile) { - struct blob_buf certbuf; - struct blob_buf payloadbuf; + struct blob_buf payloadbuf = {0}; + struct blob_buf certbuf = {0}; struct timeval tv; int pklen, siglen; int revoker = 1; -- 2.25.1