Tobias Stoeckmann
f7b84fcc67
Fixed segfault during excessive evaluation.
...
It is possible to trigger a segmentation fault while processing
an evaluation of repeating string. On a Linux 64 bit system,
enter this (or adjust arguments for 32 bit accordingly):
/eval -n ${repeat:1073741824,----}
It will overflow an integer calculation because int instead of
size_t is used. Proper check of int limitations fixes this issue.
I haven't changed this specific piece of code to size_t because it
would crash in other parts of the code tree instead. For now, int
is a limitating factor when it comes to strings (and should be
enough for sane use cases).
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org >
2019-09-17 21:26:52 +02:00
Sébastien Helleu
e8be4f62af
core: mention possible background color in /help weechat.look.nick_color_force
2019-09-16 20:58:12 +02:00
Sébastien Helleu
1beebdf01e
core: fix compilation with autotools on FreeBSD 12.0
2019-08-31 14:18:55 +02:00
Sébastien Helleu
608ec9f483
core: add values djb2_32 and sum_32 for option weechat.look.nick_color_hash (issue #1394 )
2019-08-20 21:20:33 +02:00
Sébastien Helleu
7f62985f89
core: use fixed-width integer for computing hashtable DJB2 key hash ( closes #1394 )
2019-08-19 23:29:22 +02:00
Sébastien Helleu
c411ee475a
core: create or update option weechat.notify.xxx when function buffer_set is called with "notify" property ( closes #1390 )
2019-08-10 17:48:34 +02:00
Andrew Potter
0957231d30
api: add function list_user_data (issue #666 )
2019-08-10 12:55:43 +02:00
Sébastien Helleu
fbc022a77a
core: return NULL immediately if string is NULL in function hook_modifier_exec
2019-08-04 13:30:53 +02:00
Sébastien Helleu
015ec85f10
core: add some missing default keys in /help cursor
2019-07-29 22:49:29 +02:00
Sébastien Helleu
1d6714e428
core: auto disable upgrade process (command line option "--upgrade") if the file weechat.upgrade is not found
2019-06-24 21:35:37 +02:00
Sébastien Helleu
f15a24b2ec
core: add option "close" in command /window ( closes #853 )
2019-06-17 21:08:07 +02:00
Sébastien Helleu
087d4c7af3
core: add Curl options for versions 7.53.0 to 7.63.0
2019-06-16 22:28:08 +02:00
Sébastien Helleu
fe90a5ed4e
core: replace newlines by spaces in argument "completion" of function hook_command ( closes #538 )
2019-06-16 08:14:24 +02:00
Sébastien Helleu
9178156354
api: add argument "strip_items" in function string_split
2019-06-15 20:47:14 +02:00
Sébastien Helleu
866a29c7e6
core: check that string pointer is not NULL in function "string_shared_get"
2019-06-15 17:21:06 +02:00
Sébastien Helleu
1582d923e6
core: use getopt to parse command line arguments
...
Multiple options can now be given in a single flag, for example:
weechat -ast
Following formats were allowed for command line argument with a value:
weechat -d /tmp/weechat
weechat --dir /tmp/weechat
Now these extra formats are supported as well:
weechat -d/tmp/weechat
weechat --dir=/tmp/weechat
2019-04-14 13:35:47 +02:00
Sébastien Helleu
573377e2d9
core: fix /help weechat.look.buffer_time_same
2019-04-13 20:38:19 +02:00
Adrian Bjugård
0b5bff9ef5
core: add option weechat.look.prefix_same_nick_middle ( closes #930 , closes #931 )
2019-04-13 20:36:41 +02:00
Simmo Saan
97e9046918
core: add option weechat.look.buffer_time_same ( closes #1127 )
2019-04-13 14:45:53 +02:00
Sébastien Helleu
3d95217745
api: return allocated string in hook_info callback and function info_get
2019-04-13 08:42:45 +02:00
Sébastien Helleu
5d02ff9a6d
tests: add tests on function util_signal_search
2019-04-01 00:15:25 +02:00
Sébastien Helleu
413aa499cc
core: add documentation on command line debug options (in --help and man pages)
...
Command line debug options are now documented:
* --no-dlclose: do not call the function dlclose after plugins are unloaded
* --no-gnutls: do not call the init and deinit functions of GnuTLS library
* --no-gcrypt: do not call the init and deinit functions of Gcrypt library
These options must not be used in production, they're for debug only and can be
used with tools like Valgrind or electric-fence.
2019-03-31 23:53:54 +02:00
Sébastien Helleu
b97fc2bd0f
core: don't execute command scheduled by /repeat if the buffer does not exist any more
2019-03-29 20:42:00 +01:00
Sébastien Helleu
2571d17cb9
core: don't execute command scheduled by /wait if the buffer does not exist any more
2019-03-29 20:37:18 +01:00
Sébastien Helleu
f1d18f4c26
core: use seconds by default in /repeat interval, allow unit for the interval
2019-03-29 20:31:19 +01:00
Sébastien Helleu
fa5b1eed77
core: move parsing of /wait delay in a separate function, with unit tests
2019-03-29 20:17:26 +01:00
Sébastien Helleu
b3cf270d1d
core: allow text in addition to a command in command /repeat
2019-03-29 08:37:57 +01:00
Sébastien Helleu
4e9e5f2652
api: add option "delay" in hashtable options of function command_options (issue #1327 )
2019-03-28 22:07:04 +01:00
Sébastien Helleu
2f37de9148
core: make "input_commands_allowed" work with /wait and /repeat commands (issue #928 )
2019-03-28 18:45:22 +01:00
Sébastien Helleu
2612adf899
core: add CMake option "ENABLE_CODE_COVERAGE" to compile with code coverage options
...
This option is OFF by default and should be enabled only for tests, to measure
test coverage.
2019-03-24 09:38:43 +01:00
Sébastien Helleu
1ef7a55e72
core: fix typo: Weechat -> WeeChat
2019-03-17 18:34:21 +01:00
Sébastien Helleu
99e48d7fa3
core: set max length to 4096 for /secure passphrase ( closes #1323 )
2019-03-12 21:30:01 +01:00
Sébastien Helleu
bc6c1f274c
core: improve message displayed when a command is not allowed (issue #928 )
...
The whole command with arguments and the full buffer name are now displayed in
the warning message (in debug mode only).
2019-03-11 21:12:40 +01:00
Sébastien Helleu
2b70d71aa1
core: replace argument "keep_eol" by "flags" in function string_split ( closes #1322 )
2019-03-10 18:29:16 +01:00
Sébastien Helleu
8aa5f5375e
core: add value -1 for keep_eol in function string_strip (issue #1322 )
...
The value -1 means it's a standard split, but empty items are kept, and
separators are not removed at beginning/end of string.
2019-03-09 21:56:05 +01:00
Sébastien Helleu
2f5aa3b509
core: use bitwise shift operator to define flag constants
2019-03-02 11:09:52 +01:00
Sébastien Helleu
80b980b2af
api: add function command_options (issue #928 )
2019-02-28 20:19:18 +01:00
Sébastien Helleu
55501b84d6
core: remove function gui_buffer_match_list_split, use function string_match_list
2019-02-27 07:46:29 +01:00
Sébastien Helleu
c2859096cb
api: add function string_match_list
2019-02-27 07:46:22 +01:00
Simmo Saan
c84ac65954
core: add /filter addreplace ( closes #1055 )
2019-02-23 13:37:46 +01:00
Sébastien Helleu
68b56291f9
core: merge two comments in a single one (issue #1309 , issue #1311 )
2019-02-23 11:22:58 +01:00
Sébastien Helleu
7b79fbbd09
Merge remote-tracking branch 'origin/pr/1311'
2019-02-23 11:17:02 +01:00
Simmo Saan
8ac4a75969
gui: fix use after free bug in /filter del (issue #1309 )
...
Deleting (freeing) a filter also frees its buffers, so refilter must
happen before freeing. Disabling the filter temporarily fixes the bug.
This fix disables the filter before filter_removing signal, though.
2019-02-21 16:15:58 +02:00
Simmo Saan
91936ff583
gui: only refilter affected buffers on filter change ( closes #1309 )
2019-02-21 16:03:15 +02:00
Sébastien Helleu
6a9937f08a
core: fix compilation on Mac OS ( closes #1308 )
...
This adds the missing include "unistd.h" for function "mkdtemp" (required on
Mac OS only).
2019-02-18 19:28:20 +01:00
arza
54c7afa6e2
Fix typo "part or words" -> "part of words"
2019-02-03 19:32:09 +02:00
Sébastien Helleu
1a34f87163
core: do not automatically add a space when completing "nick:" at the beginning of command line
...
The space can be added in option weechat.completion.nick_completer
(this is now the default value of the option):
/set weechat.completion.nick_completer ": "
2019-01-26 14:54:57 +01:00
Sébastien Helleu
4d9fd4c4aa
core: fix compilation of empty regular expression (not allowed on FreeBSD)
2019-01-26 10:21:39 +01:00
Sébastien Helleu
2b0057239b
core: update copyright dates
2019-01-01 15:40:51 +01:00
Sébastien Helleu
f3db256ce4
core: add note about option sec.crypt.passphrase_file in /help secure (issue #1286 )
2018-12-22 09:37:25 +01:00