-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cfff1dc
commit 7ed4cd5
Showing
2 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -212,7 +212,7 @@ int capset(cap_user_header_t header, const cap_user_data_t data) | |
#endif | ||
|
||
#ifdef VSF_SYSDEP_TRY_LINUX_SETPROCTITLE_HACK | ||
extern char** environ; | ||
extern char ** environ; | ||
static unsigned int s_proctitle_space = 0; | ||
static int s_proctitle_inited = 0; | ||
static char* s_p_proctitle = 0; | ||
|
@@ -908,6 +908,12 @@ vsf_sysutil_setproctitle_init(int argc, const char* argv[]) | |
{ | ||
int i; | ||
char** p_env = environ; | ||
/* Force p_env to stay wild */ | ||
if (0) { | ||
*p_env = (char*) 0xBAD; | ||
p_env = (char**) 0xBAD; | ||
} | ||
|
||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
john-h-kastner
Author
|
||
if (s_proctitle_inited) | ||
{ | ||
bug("vsf_sysutil_setproctitle_init called twice"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1381,7 +1381,7 @@ vsf_sysutil_statbuf_get_date(const struct vsf_sysutil_statbuf* p_statbuf, | |
{ | ||
p_date_format = "%b %d %Y"; | ||
} | ||
retval = strftime(datebuf, sizeof(datebuf), p_date_format, p_tm); | ||
retval = strftime(datebuf, sizeof(datebuf) - 1, p_date_format, p_tm); | ||
datebuf[sizeof(datebuf)-1] = '\0'; | ||
if (retval == 0) | ||
{ | ||
|
@@ -1407,7 +1407,7 @@ vsf_sysutil_statbuf_get_numeric_date( | |
{ | ||
p_tm = localtime(&p_stat->st_mtime); | ||
} | ||
retval = strftime(datebuf, sizeof(datebuf), "%Y%m%d%H%M%S", p_tm); | ||
retval = strftime(datebuf, sizeof(datebuf) - 1, "%Y%m%d%H%M%S", p_tm); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
john-h-kastner
Author
|
||
if (retval == 0) | ||
{ | ||
die("strftime"); | ||
|
@@ -2624,7 +2624,7 @@ vsf_sysutil_get_current_date(void) | |
int i = 0; | ||
curr_time = vsf_sysutil_get_time_sec(); | ||
p_tm = localtime(&curr_time); | ||
if (strftime(datebuf, sizeof(datebuf), "%a %b!%d %H:%M:%S %Y", p_tm) == 0) | ||
if (strftime(datebuf, sizeof(datebuf) - 1, "%a %b!%d %H:%M:%S %Y", p_tm) == 0) | ||
{ | ||
die("strftime"); | ||
} | ||
|
Why are you doing this?