From: xiovwx Date: Thu, 23 Jan 2025 11:06:27 +0000 (+0000) Subject: whereis: avoid accessing uninitialized memory X-Git-Tag: v2.42-start~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7e06d474b17b9b74aa8e4b8a42ab394c1f80b1fd;p=thirdparty%2Futil-linux.git whereis: avoid accessing uninitialized memory --- diff --git a/misc-utils/whereis.c b/misc-utils/whereis.c index a35c1dff2..b575e57ae 100644 --- a/misc-utils/whereis.c +++ b/misc-utils/whereis.c @@ -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;