mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-07 05:55:58 +01:00
xcursor: check that XDG base directory path is absolute
The spec reads: > All paths set in these environment variables must be absolute. If an > implementation encounters a relative path in any of these variables it should > consider the path invalid and ignore it. and > If $XDG_DATA_HOME is either not set or empty, a default equal to > $HOME/.local/share should be used. Testing that the path is absolute also entails that is is non-empty.
This commit is contained in:
parent
48c811ffb6
commit
95d3529edf
1 changed files with 1 additions and 1 deletions
|
@ -647,7 +647,7 @@ XcursorLibraryPath (void)
|
|||
}
|
||||
else {
|
||||
env_var = getenv("XDG_DATA_HOME");
|
||||
if (env_var) {
|
||||
if (env_var && env_var[0] == '/') {
|
||||
pathlen = strlen(env_var) +
|
||||
strlen(CURSORDIR ":" XCURSORPATH) + 1;
|
||||
path = malloc(pathlen);
|
||||
|
|
Loading…
Reference in a new issue