mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 18:45:40 +08:00
fix static memory free() attempt
This commit is contained in:
parent
f88ea518b9
commit
d21f6b198d
@ -48,7 +48,7 @@ static pthread_mutex_t file_mutex;
|
|||||||
|
|
||||||
unsigned long preview = 0;
|
unsigned long preview = 0;
|
||||||
|
|
||||||
char path[256];
|
char path[300];
|
||||||
|
|
||||||
static int counter = 0;
|
static int counter = 0;
|
||||||
static int timeo = 0;
|
static int timeo = 0;
|
||||||
@ -875,13 +875,15 @@ __declspec(dllexport)
|
|||||||
fp_symbols[1].next = pl->symbols.next;
|
fp_symbols[1].next = pl->symbols.next;
|
||||||
pl->symbols.next = fp_symbols;
|
pl->symbols.next = fp_symbols;
|
||||||
}
|
}
|
||||||
if(path) free(path);
|
|
||||||
dirp = (argc > 1)? argv[1] : getenv("TEMP");
|
dirp = (argc > 1)? argv[1] : getenv("TEMP");
|
||||||
if(strlen(dirp) > 200 || strchr(dirp, '%')) return (13001);
|
if(strlen(dirp) > 200 || strchr(dirp, '%')) {
|
||||||
|
fprintf(stderr, "FilePlugin: invalid directory path: %s\n", dirp);
|
||||||
|
return (13001);
|
||||||
|
}
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
sprintf(path, "%s\\%%d.tmp", dirp);
|
sprintf(path, "%.256s\\%%07d.tmp", dirp);
|
||||||
#else
|
#else
|
||||||
sprintf(path, "%s/%%d.tmp", dirp);
|
sprintf(path, "%.256s/%%07d.tmp", dirp);
|
||||||
#endif
|
#endif
|
||||||
if(argc > 2) preview = atoi(argv[2]);
|
if(argc > 2) preview = atoi(argv[2]);
|
||||||
if(!preview) preview = 32768;
|
if(!preview) preview = 32768;
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
#define VERSION "3proxy-0.8b-devel"
|
#define VERSION "3proxy-0.8b-devel"
|
||||||
#define BUILDDATE "150901162209"
|
#define BUILDDATE "150904002243"
|
||||||
|
Loading…
Reference in New Issue
Block a user