mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04: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>
This commit is contained in:
parent
06ccfbb996
commit
81a6cc4967
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue