Fix a segmentation fault when connecting to a server without a port
fix #3260
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
Version 4.3 - 2017-05-02
|
||||
========================
|
||||
|
||||
- Fix a segmentation fault that occured when trying to connect to an IRC
|
||||
server without any port configured.
|
||||
|
||||
Version 4.2 - 2017-04-26
|
||||
========================
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.0)
|
||||
project(biboumi)
|
||||
|
||||
set(${PROJECT_NAME}_VERSION_MAJOR 4)
|
||||
set(${PROJECT_NAME}_VERSION_MINOR 2)
|
||||
set(${PROJECT_NAME}_VERSION_MINOR 3)
|
||||
set(${PROJECT_NAME}_VERSION_SUFFIX "")
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -pedantic -Wall -Wextra")
|
||||
|
||||
@@ -59,6 +59,10 @@ make check %{?_smp_mflags}
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed May 2 2017 Le Coz Florent <louiz@louiz.org> - 4.3-1
|
||||
- Fix a segmentation fault that occured when trying to connect
|
||||
to an IRC server without any port configured.
|
||||
|
||||
* Wed Apr 26 2017 Le Coz Florent <louiz@louiz.org> - 4.2-1
|
||||
- Fix a build issue when LiteSQL is absent from the system
|
||||
|
||||
|
||||
@@ -182,6 +182,11 @@ void IrcClient::start()
|
||||
{
|
||||
if (this->is_connecting() || this->is_connected())
|
||||
return;
|
||||
if (this->ports_to_try.empty())
|
||||
{
|
||||
this->bridge.send_xmpp_message(this->hostname, "", "Can not connect to IRC server: no port specified.");
|
||||
return;
|
||||
}
|
||||
std::string port;
|
||||
bool tls;
|
||||
std::tie(port, tls) = this->ports_to_try.top();
|
||||
|
||||
Reference in New Issue
Block a user