Commit Graph

516 Commits

Author SHA1 Message Date
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
Tim Cava
b5f835e8fc identd:identd_handler() The third argument to accept() should be a
socklen_t.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@267 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-13 21:57:31 +00:00
Tim Cava
76528c6f38 arcfour:start_dcc_chat() The third argument to accept() should be a
socklen_t.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@266 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-13 21:53:24 +00:00
Kevin Easton
d6393b8248 acro plugin: Use correct module name when registering command.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@265 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-10 13:33:43 +00:00
Kevin Easton
b1de392172 acro plugin: Don't sort scores when saving to file. This was losing the head
of the list, and it's not necessary anyway.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@264 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-10 12:57:06 +00:00
Tim Cava
ee35df3a41 Don't seed arcfour with uninitialized stack values when urandom can't be
opened, but fail instead. Fixes using uninitialized value warnings from
Coverity.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@263 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-09 07:06:43 +00:00
Tim Cava
e39eddbc04 Oops. Remove init_schat()'s forward declaration.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@262 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-09 06:54:57 +00:00
Tim Cava
ba8b5a67cb Kill unused initialization code in arcfour.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@261 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-09 06:39:50 +00:00
Tim Cava
0e099fe064 Kill unused code in dcc_sdcc() and eliminate an unused pointer value
warning from Coverity.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@260 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-08 04:42:46 +00:00
Tim Cava
b1e59bed9e Convert uses of new_malloc/strcpy in end_vote() to m_strdup. While I'm
here, don't cast what new_malloc returns.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@259 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-07 09:28:11 +00:00
Tim Cava
c76c962feb Convert uses of new_malloc/strcpy in take_vote() to m_strdup. While
I'm here, don't cast what new_malloc returns.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@258 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-07 09:22:04 +00:00
Tim Cava
e42c16a832 Convert uses of new_malloc/strcpy in take_acro() to m_strdup. While
I'm here, don't cast what new_malloc returns.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@257 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-07 09:17:02 +00:00
Tim Cava
5ab9f87936 Simplify show_acros() by sending each line immediately, rather than
buffering lines together.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@256 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-07 08:51:25 +00:00
Tim Cava
8a02a1946a Simplify show_scores() by sending each line immediately, rather than
buffering lines together. This also avoids a dereference before null
check found by Coverity.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@255 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-07 08:39:34 +00:00
Tim Cava
114f6f52f0 Reorder the members of struct _srec to make type punning with
Lists work.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@254 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-03 03:06:44 +00:00
Tim Cava
ed1ad22d70 Rewrite read_scores() with suggestions from caf. Failing to open the scores file no longer leaks memory, and a malformed record no longer adds an empty link to the global scores list.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@253 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-02 14:42:36 +00:00
Tim Cava
4ff0b8d2d5 Make sure setupterm() returns ERR before examining the status value.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@252 13b04d17-f746-0410-82c6-800466cd88b0
2013-07-01 01:23:18 +00:00
Tim Cava
c464efa90e Fix file descriptor leak in read_scores() found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@251 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-28 07:34:06 +00:00
Tim Cava
ee761e7f02 Skip malformed entries in abots.sav, which avoids two null dereferences found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@250 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-28 05:22:20 +00:00
Tim Cava
7a5448aa74 Don't make a copy of args, it goes unused. Remove the variable it was stored to. Found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@249 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-26 13:09:01 +00:00
Tim Cava
3812cf36a6 Don't bother storing what get_window_by_name() returns, it goes unused. Found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@248 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-26 11:51:41 +00:00
Kevin Easton
b5574f3b23 Replace fprintf() of single fixed buffer with fputs().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@247 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-25 12:16:38 +00:00
Kevin Easton
8a04cbeba8 Don't pass the output of convert_output_format(FORMAT_DCC, ...) directly to
sprintf() as a format string, because there could (and usually are!) '%'
characters that will be interpreted by sprintf.

This also allows clean compilation under -Werror=format-security.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@246 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-23 14:36:32 +00:00
Kevin Easton
dd9de3dff0 Update (currently un-used) save_digraphs() function so that it compiles
cleanly with -Werror=format-security.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@245 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-23 14:32:47 +00:00
Kevin Easton
c51810738e Improve handling of one kind of malformed CDCC save file, where the pack
description line doesn't contain a space.  Found by Coverity.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@244 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-20 01:45:29 +00:00
Kevin Easton
882c3150e2 Fix open file leak in /LASTLOG, in situations like:
/LASTLOG -FILE /tmp/a -FILE /tmp/a
/LASTLOG -FILE /tmp/a -CLEAR
/LASTLOG -FILE /tmp/a -LITERAL
/LASTLOG -FILE /tmp/a -BOGUS

Found by Coverity.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@243 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-18 12:55:32 +00:00
Kevin Easton
2fc84d5f93 Fix a file descriptor leak when connect() fails during a SOCKS4 proxy
connection attempt.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@242 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-18 11:00:12 +00:00
Tim Cava
b26e295137 Improve cryptit() fixes, suggested by caf.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@241 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-17 08:00:37 +00:00
Tim Cava
df8328c3a1 Fix out-of-bounds error in cryptit() found by Coverity.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@240 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-16 14:40:52 +00:00
Kevin Easton
88172a9004 paused_topic should be the same size as help_topic_list.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@239 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-16 13:12:59 +00:00
Kevin Easton
ceb0492734 Cleanup save_formats() by removing unused function argument.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@238 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-16 12:21:03 +00:00