diff --git a/CHANGELOG.md b/CHANGELOG.md index c94e40553..985f9c3f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +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, lua, perl, python, ruby: fix conversion of dates in the API functions +- guile, lua, perl, python, ruby, tcl: 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)) diff --git a/src/plugins/tcl/weechat-tcl-api.c b/src/plugins/tcl/weechat-tcl-api.c index 2fff10faf..81a8d5d63 100644 --- a/src/plugins/tcl/weechat-tcl-api.c +++ b/src/plugins/tcl/weechat-tcl-api.c @@ -2123,13 +2123,13 @@ API_FUNC(print) API_FUNC(print_date_tags) { char *buffer, *tags, *message; - long date; + Tcl_WideInt date; API_INIT_FUNC(1, "print_date_tags", API_RETURN_ERROR); if (objc < 5) API_WRONG_ARGS(API_RETURN_ERROR); - if (Tcl_GetLongFromObj (interp, objv[2], &date) != TCL_OK) + if (Tcl_GetWideIntFromObj (interp, objv[2], &date) != TCL_OK) API_WRONG_ARGS(API_RETURN_ERROR); buffer = Tcl_GetString (objv[1]); @@ -2150,13 +2150,13 @@ API_FUNC(print_datetime_tags) { char *buffer, *tags, *message; int date_usec; - long date; + Tcl_WideInt date; API_INIT_FUNC(1, "print_datetime_tags", API_RETURN_ERROR); if (objc < 6) API_WRONG_ARGS(API_RETURN_ERROR); - if (Tcl_GetLongFromObj (interp, objv[2], &date) != TCL_OK) + if (Tcl_GetWideIntFromObj (interp, objv[2], &date) != TCL_OK) API_WRONG_ARGS(API_RETURN_ERROR); if (Tcl_GetIntFromObj (interp, objv[3], &date_usec) != TCL_OK) @@ -2205,7 +2205,7 @@ API_FUNC(print_y_date_tags) { char *buffer, *tags, *message; int y; - long date; + Tcl_WideInt date; API_INIT_FUNC(1, "print_y_date_tags", API_RETURN_ERROR); if (objc < 6) @@ -2214,7 +2214,7 @@ API_FUNC(print_y_date_tags) if (Tcl_GetIntFromObj (interp, objv[2], &y) != TCL_OK) API_WRONG_ARGS(API_RETURN_ERROR); - if (Tcl_GetLongFromObj (interp, objv[3], &date) != TCL_OK) + if (Tcl_GetWideIntFromObj (interp, objv[3], &date) != TCL_OK) API_WRONG_ARGS(API_RETURN_ERROR); buffer = Tcl_GetString (objv[1]); @@ -2236,7 +2236,7 @@ API_FUNC(print_y_datetime_tags) { char *buffer, *tags, *message; int y, date_usec; - long date; + Tcl_WideInt date; API_INIT_FUNC(1, "print_y_datetime_tags", API_RETURN_ERROR); if (objc < 7) @@ -2245,7 +2245,7 @@ API_FUNC(print_y_datetime_tags) if (Tcl_GetIntFromObj (interp, objv[2], &y) != TCL_OK) API_WRONG_ARGS(API_RETURN_ERROR); - if (Tcl_GetLongFromObj (interp, objv[3], &date) != TCL_OK) + if (Tcl_GetWideIntFromObj (interp, objv[3], &date) != TCL_OK) API_WRONG_ARGS(API_RETURN_ERROR); if (Tcl_GetIntFromObj (interp, objv[4], &date_usec) != TCL_OK) @@ -4942,13 +4942,13 @@ API_FUNC(infolist_new_var_pointer) API_FUNC(infolist_new_var_time) { const char *result; - long value; + Tcl_WideInt value; API_INIT_FUNC(1, "infolist_new_var_time", API_RETURN_EMPTY); if (objc < 4) API_WRONG_ARGS(API_RETURN_EMPTY); - if (Tcl_GetLongFromObj (interp, objv[3], &value) != TCL_OK) + if (Tcl_GetWideIntFromObj (interp, objv[3], &value) != TCL_OK) API_WRONG_ARGS(API_RETURN_EMPTY); result = API_PTR2STR(weechat_infolist_new_var_time (API_STR2PTR(Tcl_GetString (objv[1])), /* item */