mirror of
https://github.com/rofl0r/proxychains-ng.git
synced 2024-12-22 04:08:47 +00:00
fix a buffer overflow bug
This commit is contained in:
parent
86408cd806
commit
0a8663c845
@ -49,7 +49,7 @@ static void set_own_dir(const char *argv0) {
|
|||||||
size_t l = strlen(argv0);
|
size_t l = strlen(argv0);
|
||||||
while(l && argv0[l - 1] != '/')
|
while(l && argv0[l - 1] != '/')
|
||||||
l--;
|
l--;
|
||||||
if(l == 0)
|
if(l == 0 || l >= sizeof(own_dir))
|
||||||
#ifdef SUPER_SECURE
|
#ifdef SUPER_SECURE
|
||||||
memcpy(own_dir, "/dev/null/", 11);
|
memcpy(own_dir, "/dev/null/", 11);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user