diff options
author | David Robillard <d@drobilla.net> | 2013-02-03 20:21:04 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-02-03 20:21:04 +0000 |
commit | bc2c4c848b14bbdf32ec966595ec3e2bc7def386 (patch) | |
tree | 07793f90d9f5e0afc464bd786d1e63f78554d569 /src | |
parent | beeb97d9ed2fc69dbd00f866f9656d520340950f (diff) | |
download | patchage-bc2c4c848b14bbdf32ec966595ec3e2bc7def386.tar.gz patchage-bc2c4c848b14bbdf32ec966595ec3e2bc7def386.tar.bz2 patchage-bc2c4c848b14bbdf32ec966595ec3e2bc7def386.zip |
Don't ignore realpath() return value.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5042 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/binary_location.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/binary_location.h b/src/binary_location.h index 6efa37f..e238467 100644 --- a/src/binary_location.h +++ b/src/binary_location.h @@ -34,7 +34,9 @@ binary_location() const int ret = dladdr((void*)&binary_location, &dli); if (ret) { char* const bin_loc = (char*)calloc(PATH_MAX, 1); - realpath(dli.dli_fname, bin_loc); + if (!realpath(dli.dli_fname, bin_loc)) { + return NULL; + } return bin_loc; } return NULL; |