Kevin Easton
1c6ff3088a
Fix compilation problems in 'amp' plugin.
...
Four instances where 'default:' is at the end of a block replaced with
'default: break;' (reported by mscherer).
One typo where [j] should have been [1] (array out of bounds error).
Missing <unistd.h> includes for _exit(), and <string.h> for memcpy().
2015-03-17 00:06:34 +11:00
Kevin Easton
a05b1160c3
Change build to pass through CPPFLAGS if provided, and to use the DEFS value set by configure.
...
The DEFS Makefile variable has been renamed to CPPFLAGS, and is now set based on the CPPFLAGS,
INCLUDES and DEFS values provided by configure.
Reported by cpet, this allows the FreeBSD port to drop a patch.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@519 13b04d17-f746-0410-82c6-800466cd88b0
2014-11-01 14:37:41 +00:00
Kevin Easton
324cdd4c85
Update plugins to cast time_t to long when formatting with %ld.
...
Fixes platforms where time_t and long are different sizes.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@474 13b04d17-f746-0410-82c6-800466cd88b0
2013-11-16 10:59:34 +00:00
Kevin Easton
933478d7b1
Rename cavlink's randm() function to cav_randm() so that it doesn't clash with
...
the definition from ircaux.h.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@396 13b04d17-f746-0410-82c6-800466cd88b0
2013-10-16 11:59:36 +00:00
Kevin Easton
742887059d
arcfour: Zero the full size of the 'in' array.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@379 13b04d17-f746-0410-82c6-800466cd88b0
2013-10-06 13:18:22 +00:00
Tim Cava
15c5f518fd
Make the port passed to qbx's query_q_server() an unsigned short,
...
which eliminates a warning.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@323 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-14 23:18:07 +00:00
Tim Cava
bc485f95a8
Possum's llist uses memcpy, so include string.h and eliminate a warning.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@322 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-14 22:32:48 +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
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
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
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
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
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
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
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
Kevin Easton
c3a2a39513
Don't strip plugins on install - it's no longer really necessary and helps in
...
debugging to have the symbols.
Patch from Jeff Horelick <jdhore@gentoo.org >.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@220 13b04d17-f746-0410-82c6-800466cd88b0
2013-01-03 02:48:09 +00:00
Kevin Easton
69fd6e12c7
Change command used to install help files so that it ignores VCS directories.
...
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@208 13b04d17-f746-0410-82c6-800466cd88b0
2012-06-17 23:22:55 +00:00
Kevin Easton
3bbe082f16
Fix aim and nap plugin Makefiles so that they build compat.o in the right
...
place when building out-of-tree. Reported by nyet.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@166 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-08 15:20:39 +00:00
Kevin Easton
7ee26d4ed3
Change the install* targets in the Makefiles to honour DESTDIR. This
...
makes packaging the client for .deb and .rpm easier.
Reported separately by nyet and VICODAN.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@164 13b04d17-f746-0410-82c6-800466cd88b0
2012-05-08 14:34:25 +00:00