1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 14:26:39 +02:00

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.
This commit is contained in:
Sébastien Helleu
2026-06-21 07:42:02 +02:00
parent f4564a1cb0
commit 8f33a72c99
2 changed files with 6 additions and 5 deletions
+1
View File
@@ -28,6 +28,7 @@ SPDX-License-Identifier: GPL-3.0-or-later
- api: fix infinite loop in function string_replace when the search string is empty
- irc: fix tag in message with list of names when joining a channel
- fset: remove error displayed in core buffer when clicking with the mouse below the last option displayed
- guile: fix conversion of dates in the API functions
- irc: limit size of data received from the server to prevent memory exhaustion
- irc: fix out-of-bounds read on incoming DCC command with a quoted filename ending the message ([#2322](https://github.com/weechat/weechat/issues/2322))
- relay: limit size of decompressed websocket frame with permessage-deflate to prevent memory exhaustion ([GHSA-v2v4-45wm-5cr3](https://github.com/weechat/weechat/security/advisories/GHSA-v2v4-45wm-5cr3), [CVE-2026-53524](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-53524))
+5 -5
View File
@@ -2096,7 +2096,7 @@ weechat_guile_api_print_date_tags (SCM buffer, SCM date, SCM tags, SCM message)
plugin_script_api_printf_date_tags (weechat_guile_plugin,
guile_current_script,
API_STR2PTR(API_SCM_TO_STRING(buffer)),
(time_t)scm_to_long (date),
(time_t)scm_to_long_long (date),
API_SCM_TO_STRING(tags),
"%s", API_SCM_TO_STRING(message));
@@ -2117,7 +2117,7 @@ weechat_guile_api_print_datetime_tags (SCM buffer, SCM date, SCM date_usec,
weechat_guile_plugin,
guile_current_script,
API_STR2PTR(API_SCM_TO_STRING(buffer)),
(time_t)scm_to_long (date),
(time_t)scm_to_long_long (date),
scm_to_int (date_usec),
API_SCM_TO_STRING(tags),
"%s", API_SCM_TO_STRING(message));
@@ -2156,7 +2156,7 @@ weechat_guile_api_print_y_date_tags (SCM buffer, SCM y, SCM date, SCM tags,
guile_current_script,
API_STR2PTR(API_SCM_TO_STRING(buffer)),
scm_to_int (y),
(time_t)scm_to_long (date),
(time_t)scm_to_long_long (date),
API_SCM_TO_STRING(tags),
"%s", API_SCM_TO_STRING(message));
@@ -2178,7 +2178,7 @@ weechat_guile_api_print_y_datetime_tags (SCM buffer, SCM y, SCM date,
guile_current_script,
API_STR2PTR(API_SCM_TO_STRING(buffer)),
scm_to_int (y),
(time_t)scm_to_long (date),
(time_t)scm_to_long_long (date),
scm_to_int (date_usec),
API_SCM_TO_STRING(tags),
"%s", API_SCM_TO_STRING(message));
@@ -4748,7 +4748,7 @@ weechat_guile_api_infolist_new_var_time (SCM item, SCM name, SCM value)
result = API_PTR2STR(weechat_infolist_new_var_time (API_STR2PTR(API_SCM_TO_STRING(item)),
API_SCM_TO_STRING(name),
(time_t)scm_to_long (value)));
(time_t)scm_to_long_long (value)));
API_RETURN_STRING(result);
}