From 858bc9d6b9d8d77961a375e792e69666d613383f Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Sun, 4 Oct 2020 23:35:55 +0300 Subject: [PATCH] rdoff: search_libraries - zeroify stack allocated structure Coverity scan tool complains on rdffile::rdoff_ver member being called with memcpy uninitialized. Lets zap this structure explicitly once we've it allocated. CID 1432931 Signed-off-by: Cyrill Gorcunov --- rdoff/ldrdf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/rdoff/ldrdf.c b/rdoff/ldrdf.c index a78c4504..a3b0dac0 100644 --- a/rdoff/ldrdf.c +++ b/rdoff/ldrdf.c @@ -606,6 +606,7 @@ static int search_libraries(void) cur = libraries; + memset(&f, 0, sizeof(f)); while (cur) { if (options.verbose > 2) printf("scanning library `%s', pass %d...\n", cur->name, pass);