mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 05:16:38 +02:00
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.
This commit is contained in:
+1
-1
@@ -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: fix conversion of dates in the API functions
|
||||
- guile, lua, perl, python, ruby: 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))
|
||||
|
||||
@@ -2604,7 +2604,7 @@ weechat_ruby_api_print_date_tags (VALUE class, VALUE buffer, VALUE date,
|
||||
Check_Type (message, T_STRING);
|
||||
|
||||
c_buffer = StringValuePtr (buffer);
|
||||
c_date = NUM2ULONG (date);
|
||||
c_date = NUM2ULL (date);
|
||||
c_tags = StringValuePtr (tags);
|
||||
c_message = StringValuePtr (message);
|
||||
|
||||
@@ -2639,7 +2639,7 @@ weechat_ruby_api_print_datetime_tags (VALUE class, VALUE buffer, VALUE date,
|
||||
Check_Type (message, T_STRING);
|
||||
|
||||
c_buffer = StringValuePtr (buffer);
|
||||
c_date = NUM2ULONG (date);
|
||||
c_date = NUM2ULL (date);
|
||||
c_date_usec = NUM2INT (date_usec);
|
||||
c_tags = StringValuePtr (tags);
|
||||
c_message = StringValuePtr (message);
|
||||
@@ -2703,7 +2703,7 @@ weechat_ruby_api_print_y_date_tags (VALUE class, VALUE buffer, VALUE y,
|
||||
|
||||
c_buffer = StringValuePtr (buffer);
|
||||
c_y = NUM2INT (y);
|
||||
c_date = NUM2ULONG (date);
|
||||
c_date = NUM2ULL (date);
|
||||
c_tags = StringValuePtr (tags);
|
||||
c_message = StringValuePtr (message);
|
||||
|
||||
@@ -2741,7 +2741,7 @@ weechat_ruby_api_print_y_datetime_tags (VALUE class, VALUE buffer, VALUE y,
|
||||
|
||||
c_buffer = StringValuePtr (buffer);
|
||||
c_y = NUM2INT (y);
|
||||
c_date = NUM2ULONG (date);
|
||||
c_date = NUM2ULL (date);
|
||||
c_date_usec = NUM2INT (date_usec);
|
||||
c_tags = StringValuePtr (tags);
|
||||
c_message = StringValuePtr (message);
|
||||
@@ -6040,7 +6040,7 @@ weechat_ruby_api_infolist_new_var_time (VALUE class, VALUE item,
|
||||
|
||||
c_item = StringValuePtr (item);
|
||||
c_name = StringValuePtr (name);
|
||||
c_value = NUM2ULONG (value);
|
||||
c_value = NUM2ULL (value);
|
||||
|
||||
result = API_PTR2STR(weechat_infolist_new_var_time (API_STR2PTR(c_item),
|
||||
c_name,
|
||||
|
||||
Reference in New Issue
Block a user