1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 12:56:37 +02:00
Commit Graph

7808 Commits

Author SHA1 Message Date
Sébastien Helleu e9d998a9bf trigger: add unit for timer interval in /help trigger 2026-06-23 12:15:47 +02:00
Sébastien Helleu bfb34faa97 irc: replace "atol" by "atoll" for variables cast to time_t
On modern 32-bit platforms with a 64-bit time_t, long is 32-bit but time_t is
64-bit.
2026-06-21 08:19:42 +02:00
Sébastien Helleu a4b8d7aedd tcl: fix conversion of dates in the API functions
On modern 32-bit platforms with a 64-bit time_t, long is 32-bit but time_t is
64-bit.

Replace calls to Tcl_GetLongFromObj by Tcl_GetWideIntFromObj.
2026-06-21 08:19:42 +02:00
Sébastien Helleu 75b364cd89 ruby: fix conversion of dates in the API functions
On modern 32-bit platforms with a 64-bit time_t, long is 32-bit but time_t is
64-bit.

Replace calls to NUM2ULONG by NUM2ULL.
2026-06-21 08:19:42 +02:00
Sébastien Helleu 914d3df639 python: fix conversion of dates in the API functions
On modern 32-bit platforms with a 64-bit time_t, long is 32-bit but time_t is
64-bit.

Use "long long" for variables cast to time_t.
2026-06-21 08:19:42 +02:00
Sébastien Helleu a5404172c8 perl: fix conversion of dates in the API functions
On modern 32-bit platforms with a 64-bit time_t, the value returned by SvIV can
be 32-bit (its width depends on how Perl was built), whereas time_t is 64-bit.

Read the date with SvNV instead: a double represents all real timestamps
exactly, so the conversion to time_t no longer depends on the size of the Perl
integer type.
2026-06-21 08:19:42 +02:00
Sébastien Helleu 1dd423cb23 lua: fix conversion of dates in the API functions
On modern 32-bit platforms with a 64-bit time_t, long is 32-bit but time_t is
64-bit.

Use "long long" for variables cast to time_t.
2026-06-21 07:43:59 +02:00
Sébastien Helleu 8f33a72c99 guile: fix conversion of dates in the API functions
On modern 32-bit platforms with a 64-bit time_t, long is 32-bit but time_t is
64-bit.

Replace calls to scm_to_long by scm_to_long_long.
2026-06-21 07:42:02 +02:00
Sébastien Helleu f4564a1cb0 core, api: remove unneeded cast to time_t
The field `tv_sec` of struct timeval is already time_t, the cast is not needed.
2026-06-20 21:50:25 +02:00
Sébastien Helleu c4dfb16df0 core: use function util_parse_longlong to parse date in command /print 2026-06-20 17:30:42 +02:00
Sébastien Helleu 6facd390fe core: use function util_parse_longlong to parse time in function hdata_set 2026-06-20 17:30:41 +02:00
Sébastien Helleu 2aada3d0ca xfer: use util functions to parse integers 2026-06-20 17:30:41 +02:00
Sébastien Helleu 791c39cc84 trigger: use util functions to parse integers 2026-06-20 17:30:41 +02:00
Sébastien Helleu ce6a214ce1 script: use util functions to parse integers 2026-06-20 17:30:41 +02:00
Sébastien Helleu 3c302e078d relay: use util functions to parse integers 2026-06-20 17:30:41 +02:00
Sébastien Helleu 90761d6350 api: use util functions to parse integers 2026-06-20 17:30:41 +02:00
Sébastien Helleu 4eba4f9a47 python: use function util_parse_int in API function hook_signal_send 2026-06-20 17:30:41 +02:00
Sébastien Helleu fcbb508cd7 javascript: use function util_parse_int in API function hook_signal_send 2026-06-20 17:30:41 +02:00
Sébastien Helleu b49eac6f2d irc: use util functions to parse integers 2026-06-20 17:30:41 +02:00
Sébastien Helleu 9b418b4dc2 fset: use util functions to parse integers 2026-06-20 17:30:41 +02:00
Sébastien Helleu 08b173f9b7 exec: use util functions to parse integers 2026-06-20 17:30:41 +02:00
Sébastien Helleu 42b91aa91d buflist: use util functions to parse integers 2026-06-20 17:30:41 +02:00
Sébastien Helleu 4ac2f6c2ad core: use util functions to parse integers in buffer functions 2026-06-20 17:30:41 +02:00
Sébastien Helleu 3d804810a0 core: use util functions to parse integers in window functions 2026-06-20 17:30:41 +02:00
Sébastien Helleu 987b03da39 core: use util functions to parse integers in nicklist functions 2026-06-20 17:30:41 +02:00
Sébastien Helleu a1f1443fd8 core: use util functions to parse integers in function gui_line_hook_update 2026-06-20 17:30:41 +02:00
Sébastien Helleu ca8312a48c core: use function util_parse_int in function gui_key_grab_init 2026-06-20 17:30:41 +02:00
Sébastien Helleu 971f7b1660 core: use function util_parse_int in function gui_hotlist_clear_level_string 2026-06-20 17:30:41 +02:00
Sébastien Helleu 643f2fab5b core: use function util_parse_int in function gui_focus_info_hashtable_gui_focus_info_cb 2026-06-20 17:30:41 +02:00
Sébastien Helleu 5f36c52935 core: use function util_parse_int in color functions 2026-06-20 17:30:41 +02:00
Sébastien Helleu 92219ba132 core: use function util_parse_longlong in function gui_chat_hsignal_quote_line_cb 2026-06-20 17:30:41 +02:00
Sébastien Helleu 3200a05c00 relay/api: fix memory leak in resources "handshake", "input" and "completion" 2026-06-17 21:54:15 +02:00
aizu-m c40261aed1 xfer: fix out-of-bounds write in xfer_dcc_resume_hash (#2326) 2026-06-17 21:29:45 +02:00
Sébastien Helleu 9bd2aaa25d core: mute compiler warning on calls to dup() function 2026-06-15 08:22:03 +02:00
Sébastien Helleu 4e206ee3ae trigger: use "const char *" variables for result of string functions with const parameter 2026-06-15 07:55:20 +02:00
Sébastien Helleu 7ff71d2b0e spell: use "const char *" variables for result of string functions with const parameter 2026-06-15 07:55:10 +02:00
Sébastien Helleu 203fdca3e8 script: use "const char *" variables for result of string functions with const parameter 2026-06-15 07:54:40 +02:00
Sébastien Helleu e3ba25df19 relay: use "const char *" variables for result of string functions with const parameter 2026-06-15 07:54:10 +02:00
Sébastien Helleu 64566629c5 irc: use "const char *" variables for result of string functions with const parameter 2026-06-15 07:52:12 +02:00
Sébastien Helleu 7e3afaf46d core, api: use "const char *" variables for result of string functions with const parameter 2026-06-15 07:52:10 +02:00
Sébastien Helleu cf702d541f api: change type of parameter "pos_option_name" to "const char **" in function config_search_with_string 2026-06-15 07:29:33 +02:00
aizu-m e60786d059 core: fix buffer overflow in function network_pass_socks5proxy (#2325)
bound the configured proxy username and password before they are copied into the fixed stack buffer in network_pass_socks5proxy, otherwise a login longer than the buffer (a long password or token) overruns it while building the SOCKS5 auth request.
2026-06-12 13:00:17 +02:00
Sébastien Helleu de878b2303 relay/api: remove error 400 which is never returned in response to GET /api/scripts 2026-06-08 23:11:27 +02:00
Sébastien Helleu 80a47b6731 relay/api: add missing fields in script object in OpenAPI document 2026-06-08 23:11:06 +02:00
Sébastien Helleu 551c12e049 relay/api: add resource GET /api/scripts 2026-06-08 23:04:40 +02:00
Sébastien Helleu 12016c4c05 script: add info "script_languages" 2026-06-08 18:54:06 +02:00
aizu-m 51a1149852 relay: fix out-of-bounds read in relay_http_print_log_request (#2324) 2026-06-06 11:18:06 +02:00
Sébastien Helleu d74993a42c relay: limit size of partial message received while reading an HTTP request to prevent memory exhaustion
A relay client could send data with no end-of-line (an unterminated method
or header line) and dribble its payload, making WeeChat accumulate it in the
partial message buffer that grew without limit, until all memory was
exhausted. This path is reachable before authentication during websocket
initialization with the "weechat" and "irc" protocols.

The accumulated partial message is now bounded by
RELAY_HTTP_PARTIAL_MESSAGE_MAX_LENGTH: once the limit is reached, the extra
data is ignored.
2026-06-06 09:36:22 +02:00
Sébastien Helleu befbcceb7f relay/api: add field "last_read_line_id" in GET /api/buffers 2026-06-06 07:04:46 +02:00
aizu-m 56f9ad68fb xfer: fix out-of-bounds read in xfer_chat_recv_cb on empty line (#2323) 2026-06-06 07:01:18 +02:00