EionRobb / skype4pidgin

Skype Plugin for Pidgin, libpurple and more
https://github.com/EionRobb/skype4pidgin/tree/master/skypeweb#skypeweb-plugin-for-pidgin
624 stars 88 forks source link

Segmentation fault when sending file #616

Open xomachine opened 6 years ago

xomachine commented 6 years ago

The problem occurs when handling the "{\\"message\\":\\"PlatformId needs to be specified\\"}" output from skype server. Looks like it is a double free error. First freeing happens at the skypeweb_got_object_for_file function and the second one - inside the call of purple_xfer_cancel_local at skypeweb_free_xfer here. Al least the user_data variable from the skypeweb_got_object_for_file function and the swft variable inside the skypeweb_free_xfer function have the same address according to debugger.

Skypeweb version: d192665

Backtrace:

#0  ??() at :0
#1  purple_ssl_close() at :0
#2  skypeweb_free_xfer(xfer = 0x555556491110) at skypeweb_contacts.c:351
#3  purple_xfer_cancel_local() at :0
#4  skypeweb_got_object_for_file(http_conn = 0x555556d11300, response = 0x55555675b750, user_data = 0x555556bdd850) at skypeweb_contacts.c:722
#5  purple_http_connection_terminate(hc = 0x555556d11300) at purple2compat/http.c:1703
#6  _purple_http_recv_loopbody(hc = 0x555556d11300, fd = 46) at purple2compat/http.c:1275
#7  _purple_http_recv(_hc = 0x555556d11300, fd = 46, cond = PURPLE_INPUT_READ) at purple2compat/http.c:1286
#8  ??() at :0
#9  g_main_context_dispatch() at :0
#10  ??() at :0
#11  g_main_loop_run() at :0
#12  gtk_main() at :0
#13  main() at :0