mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-24 02:55:40 +08:00
minor fixes + overlapping memcpy replaced with memmove
This commit is contained in:
parent
53098814f0
commit
40d03b8a4a
@ -647,7 +647,7 @@ static int h_proxy(int argc, unsigned char ** argv){
|
|||||||
childdef.isudp = 0;
|
childdef.isudp = 0;
|
||||||
childdef.service = S_PROXY;
|
childdef.service = S_PROXY;
|
||||||
childdef.helpmessage = " -n - no NTLM support\n";
|
childdef.helpmessage = " -n - no NTLM support\n";
|
||||||
if(!resolvfunc || (resolvfunc == myresolver && !dns_table->hashsize)){
|
if(!resolvfunc || (resolvfunc == myresolver && !dns_table.hashsize)){
|
||||||
fprintf(stderr, "[line %d] Warning: no nserver/nscache configured, proxy may run very slow\n", linenum);
|
fprintf(stderr, "[line %d] Warning: no nserver/nscache configured, proxy may run very slow\n", linenum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -678,7 +678,7 @@ static int h_proxy(int argc, unsigned char ** argv){
|
|||||||
childdef.isudp = 0;
|
childdef.isudp = 0;
|
||||||
childdef.service = S_SOCKS;
|
childdef.service = S_SOCKS;
|
||||||
childdef.helpmessage = " -n - no NTLM support\n";
|
childdef.helpmessage = " -n - no NTLM support\n";
|
||||||
if(!resolvfunc || (resolvfunc == myresolver && !dns_table->hashsize)){
|
if(!resolvfunc || (resolvfunc == myresolver && !dns_table.hashsize)){
|
||||||
fprintf(stderr, "[line %d] Warning: no nserver/nscache configured, socks may run very slow\n", linenum);
|
fprintf(stderr, "[line %d] Warning: no nserver/nscache configured, socks may run very slow\n", linenum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -721,7 +721,7 @@ static int h_proxy(int argc, unsigned char ** argv){
|
|||||||
childdef.port = 53;
|
childdef.port = 53;
|
||||||
childdef.isudp = 1;
|
childdef.isudp = 1;
|
||||||
childdef.service = S_DNSPR;
|
childdef.service = S_DNSPR;
|
||||||
if(!resolvfunc || (resolvfunc == myresolver && !dns_table->hashsize) || resolvfunc == fake_resolver){
|
if(!resolvfunc || (resolvfunc == myresolver && !dns_table.hashsize) || resolvfunc == fakeresolver){
|
||||||
fprintf(stderr, "[line %d] Warning: no nserver/nscache configured, dnspr will not work as expected\n", linenum);
|
fprintf(stderr, "[line %d] Warning: no nserver/nscache configured, dnspr will not work as expected\n", linenum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
14
src/auth.c
14
src/auth.c
@ -882,20 +882,6 @@ struct auth authfuncs[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct hashentry {
|
|
||||||
unsigned char hash[sizeof(unsigned)*4];
|
|
||||||
unsigned long value;
|
|
||||||
time_t expires;
|
|
||||||
struct hashentry *next;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct hashtable {
|
|
||||||
unsigned hashsize;
|
|
||||||
struct hashentry ** hashtable;
|
|
||||||
struct hashentry * hashvalues;
|
|
||||||
struct hashentry * hashempty;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct hashtable dns_table = {0, NULL, NULL, NULL};
|
struct hashtable dns_table = {0, NULL, NULL, NULL};
|
||||||
|
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ for(;;){
|
|||||||
if(!isconnect){
|
if(!isconnect){
|
||||||
if(se==sg)*se-- = ' ';
|
if(se==sg)*se-- = ' ';
|
||||||
*se = '/';
|
*se = '/';
|
||||||
memcpy(ss, se, i - (se - sb) + 1);
|
memmove(ss, se, i - (se - sb) + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reqlen = i = (int)strlen((char *)buf);
|
reqlen = i = (int)strlen((char *)buf);
|
||||||
|
@ -657,6 +657,19 @@ typedef enum {
|
|||||||
TYPE_SERVER
|
TYPE_SERVER
|
||||||
}DATA_TYPE;
|
}DATA_TYPE;
|
||||||
|
|
||||||
|
struct hashentry {
|
||||||
|
unsigned char hash[sizeof(unsigned)*4];
|
||||||
|
unsigned long value;
|
||||||
|
time_t expires;
|
||||||
|
struct hashentry *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct hashtable {
|
||||||
|
unsigned hashsize;
|
||||||
|
struct hashentry ** hashtable;
|
||||||
|
struct hashentry * hashvalues;
|
||||||
|
struct hashentry * hashempty;
|
||||||
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user