aboutsummaryrefslogtreecommitdiffstats
path: root/src/libtracelog/libtracelog.c
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-07-10 12:24:34 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2016-07-10 12:24:34 -0400
commitbe8e844ec731a7885bbee37a2f977ed4dae2a3c7 (patch)
treee55b581d5e4e8325ee7dd7751b99b4c11813c0bc /src/libtracelog/libtracelog.c
parent--noexec (diff)
downloadfirejail-be8e844ec731a7885bbee37a2f977ed4dae2a3c7.tar.gz
firejail-be8e844ec731a7885bbee37a2f977ed4dae2a3c7.tar.zst
firejail-be8e844ec731a7885bbee37a2f977ed4dae2a3c7.zip
compile fixes
Diffstat (limited to 'src/libtracelog/libtracelog.c')
-rw-r--r--src/libtracelog/libtracelog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libtracelog/libtracelog.c b/src/libtracelog/libtracelog.c
index 0a6d8299f..3e65587c4 100644
--- a/src/libtracelog/libtracelog.c
+++ b/src/libtracelog/libtracelog.c
@@ -92,7 +92,7 @@ static void storage_add(const char *str) {
92} 92}
93 93
94// global variable to keep current working directory 94// global variable to keep current working directory
95char* cwd = NULL; 95static char* cwd = NULL;
96 96
97static char *storage_find(const char *str) { 97static char *storage_find(const char *str) {
98#ifdef DEBUG 98#ifdef DEBUG
@@ -108,7 +108,7 @@ static char *storage_find(const char *str) {
108 int allocated = 0; 108 int allocated = 0;
109 109
110 if (strstr(str, "..") || strstr(str, "/./") || strstr(str, "//") || str[0] != '/') { 110 if (strstr(str, "..") || strstr(str, "/./") || strstr(str, "//") || str[0] != '/') {
111 if (cwd != NULL & str[0] != '/') { 111 if (cwd != NULL && str[0] != '/') {
112 char *fullpath=malloc(PATH_MAX); 112 char *fullpath=malloc(PATH_MAX);
113 if (!fullpath) { 113 if (!fullpath) {
114 fprintf(stderr, "Error: cannot allocate memory\n"); 114 fprintf(stderr, "Error: cannot allocate memory\n");