diff options
author | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
commit | 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch) | |
tree | bcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/llvfs/lldir_linux.cpp | |
parent | Second Life viewer sources 1.13.3.2 (diff) | |
download | meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2 meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz |
Second Life viewer sources 1.14.0.0
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llvfs/lldir_linux.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/linden/indra/llvfs/lldir_linux.cpp b/linden/indra/llvfs/lldir_linux.cpp index 780fbdb..f46ccf2 100644 --- a/linden/indra/llvfs/lldir_linux.cpp +++ b/linden/indra/llvfs/lldir_linux.cpp | |||
@@ -51,7 +51,7 @@ static std::string getCurrentUserHome(char* fallback) | |||
51 | else | 51 | else |
52 | { | 52 | { |
53 | llinfos << "Couldn't detect home directory from passwd - trying $HOME" << llendl; | 53 | llinfos << "Couldn't detect home directory from passwd - trying $HOME" << llendl; |
54 | const char *const home_env = getenv("HOME"); | 54 | const char *const home_env = getenv("HOME"); /* Flawfinder: ignore */ |
55 | if (home_env) | 55 | if (home_env) |
56 | { | 56 | { |
57 | result_cstr = (char*) home_env; | 57 | result_cstr = (char*) home_env; |
@@ -73,7 +73,7 @@ LLDir_Linux::LLDir_Linux() | |||
73 | mCurrentDirCount = -1; | 73 | mCurrentDirCount = -1; |
74 | mDirp = NULL; | 74 | mDirp = NULL; |
75 | 75 | ||
76 | char tmp_str[LL_MAX_PATH]; | 76 | char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ |
77 | getcwd(tmp_str, LL_MAX_PATH); | 77 | getcwd(tmp_str, LL_MAX_PATH); |
78 | 78 | ||
79 | mExecutableFilename = ""; | 79 | mExecutableFilename = ""; |
@@ -85,13 +85,13 @@ LLDir_Linux::LLDir_Linux() | |||
85 | mOSUserAppDir = ""; | 85 | mOSUserAppDir = ""; |
86 | mLindenUserDir = tmp_str; | 86 | mLindenUserDir = tmp_str; |
87 | 87 | ||
88 | char path [32]; | 88 | char path [32]; /* Flawfinder: ignore */ |
89 | 89 | ||
90 | // *NOTE: /proc/%d/exe doesn't work on FreeBSD. But that's ok, | 90 | // *NOTE: /proc/%d/exe doesn't work on FreeBSD. But that's ok, |
91 | // because this is the linux implementation. | 91 | // because this is the linux implementation. |
92 | 92 | ||
93 | sprintf (path, "/proc/%d/exe", (int) getpid ()); | 93 | snprintf (path, sizeof(path), "/proc/%d/exe", (int) getpid ()); /* Flawfinder: ignore */ |
94 | int rc = readlink (path, tmp_str, sizeof (tmp_str)-1); | 94 | int rc = readlink (path, tmp_str, sizeof (tmp_str)-1); /* Flawfinder: ignore */ |
95 | if ( (rc != -1) && (rc <= ((int) sizeof (tmp_str)-1)) ) | 95 | if ( (rc != -1) && (rc <= ((int) sizeof (tmp_str)-1)) ) |
96 | { | 96 | { |
97 | tmp_str[rc] = '\0'; //readlink() doesn't 0-terminate the buffer | 97 | tmp_str[rc] = '\0'; //readlink() doesn't 0-terminate the buffer |
@@ -128,7 +128,7 @@ void LLDir_Linux::initAppDirs(const std::string &app_name) | |||
128 | LLString upper_app_name(app_name); | 128 | LLString upper_app_name(app_name); |
129 | LLString::toUpper(upper_app_name); | 129 | LLString::toUpper(upper_app_name); |
130 | 130 | ||
131 | char* app_home_env = getenv((upper_app_name + "_USER_DIR").c_str()); | 131 | char* app_home_env = getenv((upper_app_name + "_USER_DIR").c_str()); /* Flawfinder: ignore */ |
132 | if (app_home_env) | 132 | if (app_home_env) |
133 | { | 133 | { |
134 | // user has specified own userappdir i.e. $SECONDLIFE_USER_DIR | 134 | // user has specified own userappdir i.e. $SECONDLIFE_USER_DIR |
@@ -326,7 +326,7 @@ void LLDir_Linux::getRandomFileInDir(const std::string &dirname, const std::stri | |||
326 | 326 | ||
327 | std::string LLDir_Linux::getCurPath() | 327 | std::string LLDir_Linux::getCurPath() |
328 | { | 328 | { |
329 | char tmp_str[LL_MAX_PATH]; | 329 | char tmp_str[LL_MAX_PATH]; /* Flawfinder: ignore */ |
330 | getcwd(tmp_str, LL_MAX_PATH); | 330 | getcwd(tmp_str, LL_MAX_PATH); |
331 | return tmp_str; | 331 | return tmp_str; |
332 | } | 332 | } |