Commit Graph

45 Commits

Author SHA1 Message Date
Adam Hamsik 0ef3d6d5c8 Merge pull request #112 from sorki/fixWarnings
fix GCC strncpy warnings
2022-03-26 11:58:34 +01:00
Jack Hu d99c64bb78 Fix GCC errors in DEBUG mode
When we open debug mode(`./configure --devel`),
GCC will check `sign-conversion` and `conversion`.
It will cause some warnings.

Also add `-DDEBUG` to `CFLAGS` if we open debug
mode. This can open `PDEBUG()` and help you to get
detail information.

Signed-off-by: Jack Hu <spcreply@126.com>
2021-09-05 17:13:12 +08:00
Richard Marko 412ef4235b fix GCC strncpy warnings
Recent GCC added checks for this and it triggers `Werror` with

```
In function 'strncpy',
    inlined from 'proxy_gethostbyname' at src/core.c:832:2:
/nix/store/hayaj8q9rc7swx4llcjqymmg3zr525lx-glibc-2.32-25-dev/include/bits/string_fortified.h:91:10: error: '__builtin_strncpy' specified bound 8192 equals destination size [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-truncation-Werror=stringop-truncation8;;]
   91 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'strncpy',
    inlined from 'proxy_getaddrinfo' at src/core.c:917:3:
/nix/store/hayaj8q9rc7swx4llcjqymmg3zr525lx-glibc-2.32-25-dev/include/bits/string_fortified.h:91:10: error: '__builtin_strncpy' specified bound 256 equals destination size [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wstringop-truncation-Werror=stringop-truncation8;;]
   91 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```
2021-02-13 11:14:08 +01:00
aviau 7b24b954c8 support 'raw' proxy type 2020-10-27 15:23:40 -04:00
Alex Flores bd207014a2 patch for better random proxy selection 2018-04-12 21:35:23 -04:00
Semion Laptev 7aa95f9304 gethostbyname() and Makefile fixes 2012-10-10 19:19:12 +04:00
Adam Hamsik 1c020ced1e Port Proxychains to NetBSD. 2012-08-09 22:36:29 +00:00
Adam Hamsik 361889a2d2 Add option to do a development build with --devel configure flag. Rename proxy_getserverbyname to proxy_getservbyname. 2012-08-05 15:07:37 +02:00
Adam Hamsik cca0cea44a Fix couple of problems introduced/detected by clang checker and new -fno-common compiler flag. 2012-07-29 12:09:11 +02:00
Adam Hamsik 462e34f447 Add more strict warnings, make proxychains build with -Wconversion 2012-07-25 02:39:30 +02:00
Adam Hamsik 5b7270d75b Add new thread-safe getsrvbyname for MacOS X 2012-07-24 14:37:20 +02:00
Adam Hamsik e6b5f245f7 Merge branch 'rofl0r-master'
Conflicts:
	Makefile
	proxychains.lsm
	src/core.h
	src/libproxychains.c
	src/main.c
2012-07-24 14:02:18 +02:00
Adam Hamsik 8547764a82 Merge branch 'master' of https://github.com/rofl0r/proxychains into rofl0r-master
Conflicts:
	Makefile
	src/core.c
	src/core.h
	src/libproxychains.c
	src/main.c
2012-07-24 11:49:22 +02:00
rofl0r ab3ca31871 getaddrinfo: cosmetics 2012-07-16 01:34:00 +02:00
rofl0r 037edbcb8e proxy_getaddrinfo: fix segfault when hints is NULL 2012-07-16 01:19:30 +02:00
rofl0r 40edf758ee make getaddrinfo threadsafe 2012-07-16 01:05:28 +02:00
rofl0r 4b999cdae7 use threadsafe getservbyname_r 2012-07-14 17:59:56 +02:00
rofl0r 71e15e2edd simplify log func 2012-07-14 17:59:06 +02:00
rofl0r 3004240462 slightly better error message 2012-07-08 21:23:39 +02:00
rofl0r 364c785970 print everything to stderr, and fflush on PDEBUG 2012-07-08 04:18:42 +02:00
Adam Hamsik 877e1844ea Remove trailing white space. 2012-06-22 21:57:50 +02:00
Adam Hamsik e991cabb94 Merge rofl0r updates to bring both forks of proxychains to same base and to not diverge them more then they are now.
Merge branch 'master' of https://github.com/rofl0r/proxychains into rofl0r-master

Conflicts:
	Makefile
	src/core.c
	src/core.h
	src/libproxychains.c
	src/main.c
2012-01-28 00:16:53 +01:00
rofl0r 070051bb73 use macros for mutex stuff 2012-01-27 21:30:42 +01:00
rofl0r 5b5cc604a6 remove dangerous uses of inet_ntoa 2012-01-27 20:00:22 +01:00
rofl0r 3bb03892fa remove superfluous DEBUG checks 2012-01-27 19:14:17 +01:00
rofl0r e32ef26fec ran indent tool on the source code
now everythings finally correctly indented and future patches
will not be overshadowed by whitespace noise.
used the following settings
--braces-on-func-def-line
--braces-on-struct-decl-line
--braces-on-if-line
--dont-break-procedure-type
--leave-preprocessor-space
--continue-at-parentheses
-linux
-i8
-brace-indent1
--case-indentation8
--space-after-cast
--line-length120
--no-space-after-for
--no-space-after-if
--no-space-after-while
--leave-optional-blank-lines
--ignore-profile
--space-special-semicolon
--indent-label8
2012-01-27 19:03:21 +01:00
rofl0r 80817dbf6f fix *all* trailing whitespace at once 2012-01-27 17:55:37 +01:00
Adam Hamsik 952a039801 Pull some fixes from proxychains sf forum. 2012-01-27 15:41:40 +01:00
Adam Hamsik f512779539 Replace homegrown pc_stringfromipv4 standard libc inet_ntoa, this should be available on all libcs (musl checked). Reenable accidentaly disabled THREAD_SAFE. 2012-01-27 14:35:00 +01:00
Adam Hamsik f53119773a remove cdefs.h from include, fix non THREAD_SAFE build, do some more PDEBUG cleanup. 2012-01-27 14:02:36 +01:00
Adam Hamsik cdec339f11 Remove THREAD_SAFE ifdefs and use macros for it. Is there any reason to not require threads by default ? 2012-01-26 15:41:48 +01:00
rofl0r 4da71e1b44 make remote_dns_subnet a config option 2012-01-26 12:44:42 +01:00
rofl0r c3a0f677fb fix signedness of hashfunc 2012-01-17 16:09:55 +01:00
rofl0r 0845d1c044 fix potential buffer overflow (exists in vanilla 3.1 as well) 2011-11-07 17:07:00 +01:00
rofl0r 16fa60a705 oh wait. checking the hash is not enough. 2011-11-07 04:11:20 +01:00
rofl0r 08d6feace8 fix SOCKSv4a 2011-11-07 00:09:46 +01:00
rofl0r a6d778a0f1 cleanup debug code and remove warnings 2011-11-06 23:35:57 +01:00
rofl0r 41e73ab58d fix realloc and add a layer of threadsafety upon dns-list accesses 2011-11-06 17:46:11 +01:00
rofl0r d5ae1f9202 buff is unsigned char now 2011-11-06 15:47:00 +01:00
rofl0r 4cb2cf3416 fix index algo 2011-11-06 15:18:50 +01:00
rofl0r 5de7fa20c8 implemented remote proxy dns lookup via use of reserved ip ranges and a lookup table 2011-11-06 14:12:50 +01:00
rofl0r 218d242aab some cosmetic changes 2011-09-04 02:03:47 +02:00
rofl0r 5095296ddf fixed a couple of bugs, warnings, added basic gethostbyaddr support and a plain Makefile 2011-09-04 01:45:16 +02:00
rofl0r a6792b937d fixed usage of int instead of socklen_t 2011-09-02 22:53:50 +02:00
rofl0r 86be015f0d remove gnu autocrap 2011-09-02 20:32:04 +02:00