Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/haad/proxychains.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Hamsik <haaaad@gmail.com>2018-04-04 13:36:16 +0300
committerGitHub <noreply@github.com>2018-04-04 13:36:16 +0300
commit2bdf74d5a6998bcb57328ab1cb7fa4c0d0d8b6c5 (patch)
tree87d6a3826944a2a0cf4d02924b8f7ed2db8ce34e
parentc38374ab5b21464b6a5ee6137393b236faeceff0 (diff)
parente8e0b93b3705c7431853cc3c7ead266b8d577b7b (diff)
Merge pull request #66 from julian-klode/pu/fix-pbuf-null
Fix compilation error in get_config_path()
-rw-r--r--src/common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common.c b/src/common.c
index bc38671..1ca612a 100644
--- a/src/common.c
+++ b/src/common.c
@@ -15,6 +15,8 @@ char *get_config_path(char* default_path, char* pbuf, size_t bufsize) {
char *path = default_path;
if(check_path(path))
return path;
+ if (!pbuf)
+ goto err;
// priority 1: env var PROXYCHAINS_CONF_FILE
path = getenv(PROXYCHAINS_CONF_FILE_ENV_VAR);
@@ -45,6 +47,7 @@ char *get_config_path(char* default_path, char* pbuf, size_t bufsize) {
if(check_path(path))
return path;
+err:
perror("couldnt find configuration file");
exit(1);
}