diff options
author | David Robillard <d@drobilla.net> | 2011-12-01 01:17:25 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-12-01 01:17:25 +0000 |
commit | c0c37097cf3ae4f7b7e4067f9ffcd9826808782c (patch) | |
tree | 1c0555495b13d45d5f8842fc8cc0a9b8867625ae | |
parent | ff2c63e5b454026b61918c9a34dc4f8857f75edd (diff) | |
download | lilv-c0c37097cf3ae4f7b7e4067f9ffcd9826808782c.tar.gz lilv-c0c37097cf3ae4f7b7e4067f9ffcd9826808782c.tar.bz2 lilv-c0c37097cf3ae4f7b7e4067f9ffcd9826808782c.zip |
Fix crash in wordexp when LV2_PATH is corrupt (patch from Paul Davis).
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3714 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/world.c | 5 |
2 files changed, 5 insertions, 1 deletions
@@ -7,6 +7,7 @@ lilv (UNRELEASED) unstable; urgency=low * Use correct URI for dcterms:replaces (for hiding old plugins): "http://purl.org/dc/terms/replaces" * Fix compilation on BSD + * Fix crash in wordexp when LV2_PATH is corrupt -- David Robillard <d@drobilla.net> (UNRELEASED) diff --git a/src/world.c b/src/world.c index 0bad4c4..e291c55 100644 --- a/src/world.c +++ b/src/world.c @@ -561,7 +561,10 @@ expand(const char* path) #ifdef HAVE_WORDEXP char* ret = NULL; wordexp_t p; - wordexp(path, &p, 0); + if (wordexp(path, &p, 0)) { + LILV_ERRORF("Error expanding path `%s'\n", path); + return lilv_strdup (path); + } if (p.we_wordc == 0) { /* Literal directory path (e.g. no variables or ~) */ ret = lilv_strdup(path); |