Merge pull request #860 from neo-one0873/patch-1

fix: array proxy_string_port may out of bound
This commit is contained in:
van Hauser 2023-06-27 09:40:29 +03:00 committed by GitHub
commit 888da899f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2045,7 +2045,7 @@ void process_proxy_line(int32_t type, char *string) {
string[strlen(string) - 1] = 0; string[strlen(string) - 1] = 0;
if (string[strlen(string) - 1] == '\r') if (string[strlen(string) - 1] == '\r')
string[strlen(string) - 1] = 0; string[strlen(string) - 1] = 0;
if (proxy_count > MAX_PROXY_COUNT) { if (proxy_count >= MAX_PROXY_COUNT) {
fprintf(stderr, "[WARNING] maximum amount of proxies loaded, ignoring this entry: %s\n", string); fprintf(stderr, "[WARNING] maximum amount of proxies loaded, ignoring this entry: %s\n", string);
return; return;
} }