From bddf6cfe31e50274e00b5aa1d4ddef7a0db18386 Mon Sep 17 00:00:00 2001 From: Dr-Noob Date: Tue, 9 May 2023 10:58:16 +0200 Subject: [PATCH] [v1.04][PPC] Small fix for jump or move depends on uninitialised value (noted in #178) --- src/common/udev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/common/udev.c b/src/common/udev.c index 0cea9e1..953ae71 100644 --- a/src/common/udev.c +++ b/src/common/udev.c @@ -233,6 +233,7 @@ int get_num_elements_from_files(char** paths, int num_paths) { for(int j=0; j < num_bitmasks; j++) { char* end; tmpbuf = emalloc(sizeof(char) * (strlen(buf) + 1)); + memset(tmpbuf, 0, sizeof(char) * (strlen(buf) + 1)); char* commaend = strstr(buf, ","); if(commaend == NULL) { strcpy(tmpbuf, buf);