From d9dfb64c2799f07bc48e9ace8d156a59b6c2c4b4 Mon Sep 17 00:00:00 2001
From: Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
Date: Thu, 12 Feb 2015 11:31:05 -0500
Subject: [PATCH] sipaccount: fix segfault in getSupportedCiphers()

was broken since commit ac3bf29a5a24deacda1fb6a1475356fccfb415ea

Refs #66135

Change-Id: Ic18fefb97c43f26f71b8c59a5d60cda8f3f967a3
---
 daemon/src/sip/sipaccount.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/daemon/src/sip/sipaccount.cpp b/daemon/src/sip/sipaccount.cpp
index ea6fb28897..cfdcc9f3d4 100644
--- a/daemon/src/sip/sipaccount.cpp
+++ b/daemon/src/sip/sipaccount.cpp
@@ -1541,6 +1541,7 @@ SIPAccount::getSupportedCiphers() const
             RING_ERR("Could not determine cipher list on this system");
 
         // filter-out 0 ciphers
+        availCiphers.reserve(cipherNum);
         std::copy_if(avail_ciphers.begin(), avail_ciphers.end(),
                      availCiphers.begin(),
                      [](pj_ssl_cipher& item){ return item > 0; });
-- 
GitLab