From 8c4e292850acd21b173659593571f61019f4c454 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Tue, 14 Jan 2025 09:25:55 +0900 Subject: [PATCH] Fix uninitialized pointer read scanf uses uninitialized value namelist when calling scandir. Change-Id: Id5b651618477a76cefd6fca8c45c90124e825360 Signed-off-by: Jihoon Kim --- src/quirks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quirks.c b/src/quirks.c index e016bff3..ef84eea8 100644 --- a/src/quirks.c +++ b/src/quirks.c @@ -1088,7 +1088,7 @@ is_data_file(const struct dirent *dir) { static inline bool parse_files(struct quirks_context *ctx, const char *data_path) { - struct dirent **namelist; + struct dirent **namelist = NULL; int ndev = -1; int idx = 0; -- 2.34.1