Mészáros Mihály 5 anni fa
parent
commit
9fcd86f3cc
2 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 2 0
      ChangeLog
  2. 3 2
      src/server/ns_turn_server.c

+ 2 - 0
ChangeLog

@@ -34,6 +34,8 @@ Version 4.5.2 'dan Eider':
 	- Merge PR #288 (by Hristo Venev)
 		* pkg-config, and various cleanups in connfigure file
 	- Add systemd notification for better systemd integration
+	- Fix Issue #621 (by ycaibb)
+		* Fix: Null pointer dereference on tcp_client_input_handler_rfc6062data function
 
 24/06/2020 Oleg Moskalenko <[email protected]> Mihály Mészáros <[email protected]>
 Version 4.5.1.3 'dan Eider':

+ 3 - 2
src/server/ns_turn_server.c

@@ -1981,12 +1981,13 @@ static void tcp_client_input_handler_rfc6062data(ioa_socket_handle s, int event_
 		set_ioa_socket_tobeclosed(s);
 	}
 
-	if (!skip) {
+	if (!skip && ss) {
 		++(ss->peer_sent_packets);
 		ss->peer_sent_bytes += bytes;
 	}
 
-	turn_report_session_usage(ss, 0);
+	if(ss)
+		turn_report_session_usage(ss, 0);
 }
 
 static void tcp_conn_bind_timeout_handler(ioa_engine_handle e, void *arg)