diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2014-03-18 12:08:11 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2014-03-18 12:08:11 +0100 |
commit | ffb0ec47c2f469083babc9a771cacef03172c93d (patch) | |
tree | 98bfe038e55a31db22b3d662cbffbfcb5dad1ea6 /src/core | |
parent | 476729b89741fceaf4b044aef10a095d1ac6098b (diff) | |
download | weechat-ffb0ec47c2f469083babc9a771cacef03172c93d.zip |
core: check validity of buffer pointer when data is sent to a buffer
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/wee-input.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/wee-input.c b/src/core/wee-input.c index beef72d9d..ad4eb08b6 100644 --- a/src/core/wee-input.c +++ b/src/core/wee-input.c @@ -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) |