Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] config: fix several access(NULL) calls

From: Thomas Rast <hidden>
Date: 2016-06-15 22:54:15

Matthieu Moy [off-list ref] writes:
When $HOME is unset, home_config_paths fails and returns NULL pointers
for user_config and xdg_config. Valgrind complains with Syscall param
access(pathname) points to unaddressable byte(s).

Don't call blindly access() on these variables, but test them for
NULL-ness before.

Signed-off-by: Matthieu Moy <redacted>
---
quoted
This patch causes valgrind warnings in t1300.81 (get --path copes with
unset $HOME) about passing NULL to access():
Indeed. The following patch should fix it.
Thanks!

Tested-by: Thomas Rast <redacted>

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help