mirror of
https://github.com/weechat/weechat.git
synced 2026-06-29 06:16:40 +02:00
core: check validity of buffer pointer when data is sent to a buffer
This commit is contained in:
@@ -15,6 +15,8 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
|
||||
|
||||
== Version 0.4.4 (under dev)
|
||||
|
||||
* core: check validity of buffer pointer when data is sent to a buffer
|
||||
(command/text from user and API function "command")
|
||||
* core: fix crash when buffer is closed during execution of multiple commands
|
||||
(closes #27)
|
||||
* core: fix compilation on SmartOS (bug #40981, closes #23)
|
||||
|
||||
@@ -159,8 +159,11 @@ input_data (struct t_gui_buffer *buffer, const char *data)
|
||||
const char *ptr_data, *ptr_data_for_buffer;
|
||||
int length, char_size, first_command;
|
||||
|
||||
if (!buffer || !data || !data[0] || (data[0] == '\r') || (data[0] == '\n'))
|
||||
if (!buffer || !gui_buffer_valid (buffer)
|
||||
|| !data || !data[0] || (data[0] == '\r') || (data[0] == '\n'))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
buffer_full_name = strdup (buffer->full_name);
|
||||
if (!buffer_full_name)
|
||||
|
||||
Reference in New Issue
Block a user