Unset LD_LIBRARY_PATH, unless specified

This commit is contained in:
Mykyta Holubakha 2017-01-16 01:05:05 +02:00
parent 81102e8eac
commit 138bcd0cfa
2 changed files with 8 additions and 2 deletions

View file

@ -214,7 +214,11 @@ int main(int argc, char **argv) {
// Security:
unsetenv("LD_PRELOAD");
#ifdef _LD_LIBRARY_PATH
setenv("LD_LIBRARY_PATH", _LD_LIBRARY_PATH, 1);
#else
unsetenv("LD_LIBRARY_PATH");
#endif
int c;
while (1) {