xfer: fix crash on DCC send if option xfer.file.auto_accept_nicks is set (closes #781)

v2.8-utf8proc
Sébastien Helleu 2016-08-20 19:52:47 +02:00
parent c2ea70c3e9
commit 2f0d39f98d
2 changed files with 3 additions and 1 deletions

View File

@ -40,6 +40,7 @@ Bug fixes::
* api: fix crash in function string_split_command() when the separator is not a semicolon (issue #731)
* irc: fix NULL pointer dereference in 734 command callback (issue #738)
* relay: return an empty hdata when the requested hdata or pointer is not found (issue #767)
* xfer: fix crash on DCC send if option xfer.file.auto_accept_nicks is set (issue #781)
Documentation::

View File

@ -823,7 +823,8 @@ xfer_new (const char *plugin_name, const char *plugin_id,
* auto-accept file/chat if nick is auto-accepted, or if file/chat is
* auto-accepted
*/
if (xfer_nick_auto_accepted (new_xfer->plugin_id, new_xfer->remote_nick)
if ((XFER_IS_RECV(type)
&& xfer_nick_auto_accepted (new_xfer->plugin_id, new_xfer->remote_nick))
|| ((type == XFER_TYPE_FILE_RECV)
&& weechat_config_boolean (xfer_config_file_auto_accept_files))
|| ((type == XFER_TYPE_CHAT_RECV)