Commit Graph

249 Commits

Author SHA1 Message Date
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
Kevin Easton
bad477f9dc Fix off-by-one error in the check for s against FD_SETSIZE in add_socketread()
and set_socketwrite().  This was found by Coverity.



git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@237 13b04d17-f746-0410-82c6-800466cd88b0
2013-06-16 06:04:29 +00:00
Kevin Easton
6045b8fe91 Fix installhelp target on OpenBSD.
The -R flag to cpio isn't portable, so replace it with an open-coded
shell loop.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@236 13b04d17-f746-0410-82c6-800466cd88b0
2013-05-22 11:56:20 +00:00
Kevin Easton
092d9789e0 Order the rfc1459[] array correctly.
This is a longstanding bug - it's also present in EPIC4 and EPIC5 so it's
probably been in BitchX since the beginning.  The bug has been latent until
the AUTHENTICATE and CAP commands were added, which perturbed the binary
search so that the client didn't see invite messages properly.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@235 13b04d17-f746-0410-82c6-800466cd88b0
2013-04-24 12:05:44 +00:00
Kevin Easton
73269ea887 Bail out of check_auto_reply() early if auto_str is NULL. This fixes a
crash after /SETAR -.

Reported by riderplus.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@234 13b04d17-f746-0410-82c6-800466cd88b0
2013-03-01 12:33:00 +00:00
Kevin Easton
17e3a91f03 Remove handling for the 484 numeric. It was intended for ircnet's 484
(ERR_RESTRICTED), to set user mode +r - however this does not appear to
be necessary anymore.  It was also buggy for several reasons: due to 
a change in set_server_flag() this has actually been setting mode +G; and
484 is ERR_ISCHANSERVICE on other ircds.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@233 13b04d17-f746-0410-82c6-800466cd88b0
2013-02-25 12:22:54 +00:00
Tim Cava
d7a0c781f8 Convert simple uses of alloca/strcpy to LOCAL_COPY.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@232 13b04d17-f746-0410-82c6-800466cd88b0
2013-02-24 07:32:59 +00:00
Tim Cava
a7c93a3950 Remove a redundant call to alloca.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@231 13b04d17-f746-0410-82c6-800466cd88b0
2013-02-23 20:57:24 +00:00
Kevin Easton
e99861dbfb Add /OBITS command showing obituaries for long-time BitchX friends.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@230 13b04d17-f746-0410-82c6-800466cd88b0
2013-02-21 22:29:34 +00:00
Kevin Easton
5da6c807c2 Remove old reference to BitchX.com
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@229 13b04d17-f746-0410-82c6-800466cd88b0
2013-02-21 11:04:35 +00:00
Kevin Easton
29a3747534 Fix sequence point issue in arcfour (S[x] = --x; is undefined).
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@228 13b04d17-f746-0410-82c6-800466cd88b0
2013-02-16 13:32:00 +00:00
Kevin Easton
1390402af1 Fix abuses of the RESIZE() macro in array.c, of the form:
x = RESIZE(x, type, size);

which should just be:

RESIZE(x, type, size);

The erroneous use is undefined behaviour according to the C standard, and
causes new versions of gcc (and, apparently, clang) to throw a warning.

Reported by nenolod/moogle.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@227 13b04d17-f746-0410-82c6-800466cd88b0
2013-02-16 08:11:07 +00:00
Kevin Easton
934d19aaa2 Some more minor BitchX.quit tidying.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@226 13b04d17-f746-0410-82c6-800466cd88b0
2013-02-16 08:06:20 +00:00
Kevin Easton
da954a5c37 Apply patch from Dan Mashal (VICODAN) - Fix incorrect FSF address.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@225 13b04d17-f746-0410-82c6-800466cd88b0
2013-01-17 12:55:55 +00:00
Kevin Easton
a1ec2113e9 Fix sort_scores in the acro plugin - pass the correct number of array entries
to qsort() and properly reconstruct the list.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@224 13b04d17-f746-0410-82c6-800466cd88b0
2013-01-04 10:11:32 +00:00
Kevin Easton
f51de3a170 Fix the timer callbacks in the acro plugin to use the correct function
signature.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@223 13b04d17-f746-0410-82c6-800466cd88b0
2013-01-04 09:03:12 +00:00
Kevin Easton
bf40ef7015 Use INSTALL_DATA instead of INSTALL to install the BitchX.hints file. This
means it's not made executable.

Patch from Jeff Horelick <jdhore@gentoo.org>.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@222 13b04d17-f746-0410-82c6-800466cd88b0
2013-01-03 03:03:30 +00:00
Kevin Easton
84346beafa Make 'toc' target a dependency of aim.so, so that parallel building works.
Patch from Jeff Horelick <jdhore@gentoo.org>.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@221 13b04d17-f746-0410-82c6-800466cd88b0
2013-01-03 02:57:39 +00:00