732 Commits

Author SHA1 Message Date
Tim Cava
536aea4704 Use strlcpy, rather than strmcpy, in function_prefix. From caf.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@378 13b04d17-f746-0410-82c6-800466cd88b0
2013-10-02 00:02:54 +00:00
Kevin Easton
717d2e88b7 Fix incorrect truncation in cluster() caused by strlcpy().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@377 13b04d17-f746-0410-82c6-800466cd88b0
2013-09-28 14:26:57 +00:00
Kevin Easton
d7bdc25960 Use memcpy() instead of strlcpy() in two places where the source length is
known and the destination length is known to be sufficient.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@376 13b04d17-f746-0410-82c6-800466cd88b0
2013-09-28 14:01:23 +00:00
Tim Cava
07c6a61fed Use strlcpy, rather than strmcpy, in extract().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@375 13b04d17-f746-0410-82c6-800466cd88b0
2013-09-21 05:12:43 +00:00
Tim Cava
d01233f559 Use strlcpy, rather than strmcpy, in extract2().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@374 13b04d17-f746-0410-82c6-800466cd88b0
2013-09-21 05:11:07 +00:00
Tim Cava
21612025eb Use strlcpy and strlcat, rather than strmcpy and strmcat, in decrypt_msg().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@373 13b04d17-f746-0410-82c6-800466cd88b0
2013-09-18 23:41:46 +00:00
Tim Cava
ea5aa01f87 Use strlcpy, rather than strmcpy, in cluster().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@372 13b04d17-f746-0410-82c6-800466cd88b0
2013-09-18 23:28:07 +00:00
Tim Cava
6afd2d4a87 Use strlcpy, rather than strmcpy, in Tcl_GetKeyedListField().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@371 13b04d17-f746-0410-82c6-800466cd88b0
2013-09-18 23:17:23 +00:00
Tim Cava
c907a548e0 Use strlcpy, rather than strmcpy, in Tcl_GetKeyedListKeys().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@370 13b04d17-f746-0410-82c6-800466cd88b0
2013-09-18 23:16:12 +00:00
Tim Cava
4de9626a99 Use strlcpy, rather than strmcpy, in set_input_heb().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@369 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-26 08:06:36 +00:00
Tim Cava
fafd888528 Cleanup rename_file() a little bit. Use strlcpy, rather than strmcpy.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@368 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-26 08:04:21 +00:00
Tim Cava
c13b00be0c Use strlcpy, rather than strmcpy, in set_input().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@367 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-23 05:37:03 +00:00
Tim Cava
4ba3f45a89 Cleanup check_mode_lock() a little bit. Use strlcat, rather than strcat.
Prefer m_strdup over malloc_strcpy.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@366 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-23 04:49:54 +00:00
Tim Cava
56f5eceb26 Don't compare an array (cx_function) against NULL. Don't bother checking
whether a context is empty, since the result is the same.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@365 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-23 02:55:27 +00:00
Tim Cava
ceada1fac4 Use strlcpy, rather than strmcpy, in split_CTCP().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@364 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-21 05:57:50 +00:00
Tim Cava
1524033b3f Use strlcpy and strlcat, rather than strmcpy, strmcat, and strcpy, in
do_notice_ctcp().


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@363 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-21 05:53:18 +00:00
Tim Cava
3808071ba6 Use strlcpy and strlcat, rather than strmcpy, strmcat, and strcpy, in
do_ctcp().


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@362 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-21 05:46:02 +00:00
Kevin Easton
4118a120bc Don't truncate the password and salt passed to crypt() by the $crypt()
scripting function - this allows alternate hashing methods to be selected
if supported by the C library.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@361 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-20 12:50:39 +00:00
Tim Cava
9207c838f9 Use strlcpy and strlcat, rather than strmcpy and strncat, in tcl_putdcc().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@360 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-18 09:56:12 +00:00
Kevin Easton
2fea73808f Improve the initial seeding of the randm() RNG. This is the RNG selected
for $rand() when RANDOM_SOURCE is 1.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@359 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 15:10:17 +00:00
Kevin Easton
641565d4eb Strengthen the algorithm that generates a random cookie for /detach.
This is a backwards-compatible change, no update to the scr-bx binary
is necessary.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@358 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 14:51:28 +00:00
Kevin Easton
5582171286 Switch random_number() to always use the best entropy source for internal
client purposes.  The RANDOM_SOURCE setting now only affects the $rand()
scripting function.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@357 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 14:47:04 +00:00
Tim Cava
d194069da9 Use strlcpy, rather than strmcpy, in expand_twiddle().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@356 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 09:28:09 +00:00
Tim Cava
b80425ce7d Use strlcpy, rather than strmcpy, in get_userhost().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@355 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 09:18:11 +00:00
Tim Cava
94f99bfdbb Use strlcpy, rather than strmcpy, in make_channel().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@354 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 09:11:04 +00:00
Tim Cava
41e52c7cf5 Use strlcpy, rather than strmcpy, in do_newuser().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@353 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 09:07:32 +00:00
Tim Cava
0b32d978f8 Actually use strlcpy.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@352 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 07:31:03 +00:00
Tim Cava
9a36857761 Use strlcpy, rather than strmcpy, in new_dcc_message_transmit().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@351 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 07:29:02 +00:00
Tim Cava
ebd5398d89 Use strlcpy, rather than strmcpy, in create_timer_ref().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@350 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 06:22:58 +00:00
Tim Cava
cc8f50b187 Use strlcpy, rather than strmcpy, in ov_server().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@349 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 06:16:00 +00:00
Tim Cava
44c4f2baf9 Use strlcpy, rather than strmcpy, in function_ftime().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@348 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 06:05:22 +00:00
Tim Cava
86e3064d2c Use strlcpy, rather than strmcpy, in function_rot13().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@347 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 06:03:32 +00:00
Tim Cava
23d1f6ad74 Use strlcpy, rather than strmcpy, in function_fsize().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@346 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 06:02:08 +00:00
Tim Cava
e095a1f373 Use strlcpy, rather than strmcpy, in function_fexist().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@345 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:58:39 +00:00
Tim Cava
2caa8a2637 Use strlcpy, rather than strmcpy, in set_realname().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@344 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:42:09 +00:00
Tim Cava
7af7913c98 Use strlcpy, rather than strmcpy, in tcl_putscr().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@343 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:21:31 +00:00
Tim Cava
172bb8c409 Use strlcpy, rather than strmcpy, in tcl_putserv().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@342 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:19:50 +00:00
Tim Cava
3c4acd0446 Use strlcpy, rather than strmcpy, in tcl_putloglev().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@341 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:16:23 +00:00
Tim Cava
5b3d5bf285 Use strlcpy, rather than strmcpy, in tcl_putcmdlog().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@340 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:14:29 +00:00
Tim Cava
905bceb348 Use strlcpy, rather than strmcpy, in tcl_putlog().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@339 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:13:15 +00:00
Tim Cava
8a0d84b3ab Use strlcpy, rather than strmcpy, in status_windowspec().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@338 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:06:38 +00:00
Tim Cava
bcdf91f415 Use strlcpy, rather than strmcpy, in status_refnum().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@337 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:04:20 +00:00
Tim Cava
e8bca384b9 Use strlcpy, rather than strmcpy, in status_topic().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@336 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 05:01:46 +00:00
Tim Cava
adf7bc4b68 Use strlcpy, rather than strmcpy, in status_channel().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@335 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 04:59:44 +00:00
Tim Cava
d56010df9b Use strlcpy, rather than strmcpy, in status_umode().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@334 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 04:54:42 +00:00
Tim Cava
fdddcf99bf Use strlcpy, rather than strmcpy, in make_status().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@333 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 04:47:19 +00:00
Tim Cava
89d82d7ae0 Use strlcpy, rather than strmcpy, in fix_status_buffer().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@332 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-17 04:39:08 +00:00
Kevin Easton
0b0dbf5cf7 Make the RANDOM_LOCAL_PORTS setting actually use a random port.
The code was calling random_number(65535 - 1024), but a non-zero argument
to random_number() is actually a seed to reseed the generator, and causes
random_number() to return zero.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@331 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 15:06:21 +00:00
Kevin Easton
176be1cff2 Add the ability to bind listening sockets to addresses, and use this for the
/detach IPC socket.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@330 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 14:05:15 +00:00
Tim Cava
a394019490 Use strlcpy, rather than strmcpy, in window_log().
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@329 13b04d17-f746-0410-82c6-800466cd88b0
2013-08-15 10:55:09 +00:00