From 7e06d474b17b9b74aa8e4b8a42ab394c1f80b1fd Mon Sep 17 00:00:00 2001
From: xiovwx <xiovwx@gmail.com>
Date: Thu, 23 Jan 2025 11:06:27 +0000
Subject: [PATCH] whereis: avoid accessing uninitialized memory
Reference:https://github.com/util-linux/util-linux/commit/7e06d474b17b9b74aa8e4b8a42ab394c1f80b1fd
Conflict:NA
misc-utils/whereis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -471,7 +471,7 @@ static void findin(const char *dir, const char *pattern, int *count,
static void lookup(const char *pattern, struct wh_dirlist *ls, int want)
{
- char patbuf[PATH_MAX];
+ char patbuf[PATH_MAX] = { 0 };
int count = 0;
char *wait = NULL, *p;
--
2.33.0