[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] Fix crash running in restricted environment.

PulseAudio Marge Bot (@pulseaudio-merge-bot) gitlab at gitlab.freedesktop.org
Sun Nov 12 15:20:58 UTC 2023



PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio


Commits:
81a6cc49 by Igor V. Kovalenko at 2023-11-12T15:53:38+03:00
Fix crash running in restricted environment.

When `pwd.h` header is not available (i.e. not using glibc) and environment
variables are not set (e.g. running via `env --ignore-environment`) client
library would crash due to uninitialized variable in `pa_get_home_dir()`.
Add missing initialization to fix that.

Fixes: #3792
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/800>

- - - - -


1 changed file:

- src/pulse/util.c


Changes:

=====================================
src/pulse/util.c
=====================================
@@ -167,7 +167,7 @@ char *pa_get_host_name(char *s, size_t l) {
 
 char *pa_get_home_dir(char *s, size_t l) {
     char *e;
-    char *dir;
+    char *dir = NULL;
 #ifdef HAVE_PWD_H
     struct passwd *r;
 #endif



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/81a6cc4967d1f19cef800932b10ade7f896ee2ea

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/81a6cc4967d1f19cef800932b10ade7f896ee2ea
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20231112/57333ffa/attachment.htm>


More information about the pulseaudio-commits mailing list