Commit Graph

496 Commits

Author SHA1 Message Date
Tim Cava
c0bc9294cd Use strlcpy, rather than strmcpy, in parse_args().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@317 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-14 07:01:30 +00:00
Tim Cava
b1d55bce82 Use memcpy, rather than strmcpy or strlcpy, in parse_command(). Suggested
by caf.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@316 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-14 04:15:09 +00:00
Tim Cava
0460b22bb0 Use strlcpy, rather than strmcpy, in realname_cmd().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@315 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-12 10:57:52 +00:00
Tim Cava
18142f0abe Use strlcpy, rather than strmcpy, in set_username().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@314 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-12 10:37:10 +00:00
Tim Cava
44e59337ee Include the size of hostname, nickname, realname, userhost and username
in their forward declarations.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@313 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-12 10:36:14 +00:00
Kevin Easton
338a8ecd4c Remove unnecessary declarations in term.c for wserv builds.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@312 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-12 09:40:59 +00:00
Tim Cava
ca7f9c6b86 Use memcmp, rather than strncmp, in wavplay's validate_wav_header(),
and avoid warnings about mismatched signedness.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@311 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-11 08:20:37 +00:00
Kevin Easton
c7cefb1c05 Don't look beyond the end of a cparse format if it ends with % or $.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@310 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-10 15:59:04 +00:00
Kevin Easton
9e0ba0a573 Pass correct buffer size to fgets().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@309 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-10 03:54:48 +00:00
Tim Cava
975bc2bc57 Don't compare an array to NULL, but check that the first character isn't
NULL. Found by Coverity.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@308 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-09 07:30:54 +00:00
Kevin Easton
6691732900 Make add_socketread() close the new socket if it can't be added to the
socket manager because it exceeds FD_SETSIZE.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@307 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-07 23:03:45 +00:00
Tim Cava
718e53d6f0 Refactor fserv's make_temp_list(), with help from caf, and use mkstemp()
instead of tmpnam(), which is dangerous. Found by Coverity.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@306 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-07 01:00:11 +00:00
Tim Cava
16fac903e9 Reverse the last commit, which accidentally included generated files.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@305 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-07 00:56:16 +00:00
Tim Cava
1ead56a251 Refactor fserv's make_temp_list(), with help from caf, and use mkstemp()
instead of tmpnam(), which is dangerous. Found by Coverity.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@304 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-07 00:50:43 +00:00
Kevin Easton
c85ca721e3 strmcpy() does include the null terminator in the maximum number of bytes to
be written, so use sizeof - 1 instead of sizeof.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@303 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-01 14:47:12 +00:00
Tim Cava
565621d070 Use strmcpy, instead of strcpy, to initialize FSstr. Fixes a potential buffer overflow found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@302 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-31 09:28:46 +00:00
Tim Cava
aefa6e71f4 Kill an unnecessary LOCAL_COPY() in fserv's print_mp3().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@301 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-31 07:39:13 +00:00
Tim Cava
94e04ff631 Remove a small amount of dead code found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@300 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-31 07:28:45 +00:00
Tim Cava
b0fa3c55e6 Fix the for loop in cav_away().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@299 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-31 07:15:29 +00:00
Tim Cava
4057523aef Don't bother storing what find_in_list() returns, it goes unused. Found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@298 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-31 05:50:22 +00:00
Tim Cava
d68a196b8a Mention fixes to commands in the banlist.c cleanup.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@297 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-31 05:40:44 +00:00
Tim Cava
92012cccd1 Cleanup banlist.c and fix a few bugs, with suggestions from caf.
* Restore from_server in doop() when prepare_command() fails
* Make /bans &channel work
* Make /unban #channel #number work (caf)


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@296 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-17 14:17:29 +00:00
Tim Cava
49a7117900 Including dcc.h in window.c is unnecessary.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@295 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 06:21:26 +00:00
Tim Cava
73bf008b9f Remove a duplicate include of dcc.h.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@294 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 06:20:49 +00:00
Tim Cava
2d0c2ac415 Including dcc.h in screen.c is unnecessary.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@293 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 06:19:53 +00:00
Tim Cava
be47d08d53 Including dcc.h in exec.c is unnecessary.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@292 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 06:19:02 +00:00
Tim Cava
4309055cf7 Including dcc.h in commands2.c is unnecessary.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@291 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 06:02:23 +00:00
Tim Cava
b786c75e7a Include string.h in arcfour's MD5 implementation, since it uses memset().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@290 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 04:23:40 +00:00
Tim Cava
6ae6edc0fb Make the definition of Tgetstr() use the value of y, when terminfo is
available, which quiets an unused variable warning.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@289 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 04:13:52 +00:00
Tim Cava
2d80cbb680 Restore this variable, as it's used when terminfo isn't available.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@288 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 03:48:43 +00:00
Tim Cava
3b509dfa52 Kill an unused variable in term_init().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@287 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 03:17:49 +00:00
Kevin Easton
84a87ca7ec Add socklen_t typedef for very old systems that don't provide it.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@286 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-15 01:29:43 +00:00
Kevin Easton
9378704c39 Improve the list_channels() function so that it behaves correctly when
connected to multiple servers.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@285 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 14:01:20 +00:00
Kevin Easton
7d9ffbe792 Add Changelog entry for socklen_t change.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@284 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 13:33:09 +00:00
Kevin Easton
e915462aef Change a & to && in BX_do_compress_modes() to squash a warning. Should
be no behavioural change.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@283 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 13:25:22 +00:00
Tim Cava
0450875ab5 Remove two unnecessary includes from alias.c.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@282 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 05:26:51 +00:00
Tim Cava
37dcaad1ae Make the addrlen passed to connect() in connect_by_number() a socklen_t.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@281 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 04:16:13 +00:00
Tim Cava
e070369079 Make the namelen passed to getsockname() a socklen_t everywhere.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@280 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 03:26:00 +00:00
Tim Cava
80cfa9c5d8 Make the namelen passed to getpeername() a socklen_t everywhere.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@279 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 03:18:47 +00:00
Tim Cava
27ed98a03d Make the addrlen passed to my_accept() a socklen_t everywhere.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@278 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 03:09:16 +00:00
Tim Cava
a3b938dfd5 Make the addrlen argument to my_accept() a socklen_t.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@277 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 02:59:11 +00:00
Kevin Easton
2235c029bb Update Changelog for sys/termios -> termios fix.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@276 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 02:03:44 +00:00
Kevin Easton
cc0b75f2dd Include <termios.h> in preference to <sys/termios.h>.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@275 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 02:01:59 +00:00
Kevin Easton
ce86c78a21 Respin configure and defs.h.in for configure.in r273.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@274 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 00:57:29 +00:00
Kevin Easton
4673c6ff01 Add configure check for <termios.h>.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@273 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 00:55:35 +00:00
Kevin Easton
791c49986e Remove unnecessary termios.h includes.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@272 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 00:51:58 +00:00
Kevin Easton
d2b9d769e8 Respin configure and defs.h.in for configure.in r270.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@271 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 00:24:05 +00:00
Kevin Easton
f4d7123ad6 Add configure check for socklen_t.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@270 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-14 00:14:24 +00:00
Tim Cava
b4cd944bef The third argument to accept() should be a socklen_t.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@269 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-13 22:21:32 +00:00
Tim Cava
64779fd515 nap:naplink_handlelink() The third argument to accept() should be a
socklen_t.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@268 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-13 21:58:15 +00:00