This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=4c6e077bfb53e5c66578bd0d55b20c81f4820224 commit 4c6e077bfb53e5c66578bd0d55b20c81f4820224 (HEAD -> main) Author: Guillem Jover <[email protected]> AuthorDate: Thu Jul 11 02:55:39 2024 +0200 libdpkg: Do not try to strdup() a NULL pointer in dpkg_get_pid_execname() If the function is compiled on a port that is currently not handled by the function port specific pre-processor conditionals, the code would try to strdup() a NULL pointer. Handle this explicitly and return NULL in that case. Fixes: commit d6a9bb6951166a7254ab2b4f887c69c4bd4fb1a7 Warned-by: cppcheck Changelog: silent --- lib/dpkg/execname.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/dpkg/execname.c b/lib/dpkg/execname.c index 741ff02ab..6529fcfd0 100644 --- a/lib/dpkg/execname.c +++ b/lib/dpkg/execname.c @@ -158,6 +158,8 @@ dpkg_get_pid_execname(pid_t pid) if (len == 0) pathname[0] = '\0'; execname = pathname; +#else + return execname; #endif return m_strdup(execname); -- Dpkg.Org's dpkg

