From 1a50e5d847b11964abeae3ddd57a98c10a4f4627 Mon Sep 17 00:00:00 2001
From: Tristan Matthews <tristan.matthews@savoirfairelinux.com>
Date: Fri, 27 Apr 2012 14:12:57 -0400
Subject: [PATCH] * #10016: SDES: fix uninitialized value bug, use const char*

---
 daemon/src/sip/sdes_negotiator.cpp | 1 -
 daemon/src/sip/sdes_negotiator.h   | 8 ++++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/daemon/src/sip/sdes_negotiator.cpp b/daemon/src/sip/sdes_negotiator.cpp
index a8eed12a7d..53dea5e741 100644
--- a/daemon/src/sip/sdes_negotiator.cpp
+++ b/daemon/src/sip/sdes_negotiator.cpp
@@ -91,7 +91,6 @@ std::vector<CryptoAttribute *> SdesNegotiator::parse()
     // Take each line from the vector
     // and parse its content
 
-
     std::vector<CryptoAttribute *> cryptoAttributeVector;
 
     for (std::vector<std::string>::iterator iter = remoteAttribute_.begin();
diff --git a/daemon/src/sip/sdes_negotiator.h b/daemon/src/sip/sdes_negotiator.h
index 416f940b01..c6d575da1d 100644
--- a/daemon/src/sip/sdes_negotiator.h
+++ b/daemon/src/sip/sdes_negotiator.h
@@ -62,7 +62,7 @@ enum KeyMethod {
 };
 
 struct CryptoSuiteDefinition {
-    char * name;
+    const char *name;
     int masterKeyLength;
     int masterSaltLength;
     int srtpLifetime;
@@ -81,9 +81,9 @@ struct CryptoSuiteDefinition {
 * as defined in RFC4568 (6.2)
 */
 static const CryptoSuiteDefinition CryptoSuites[] = {
-    { (char*) "AES_CM_128_HMAC_SHA1_80", 128, 112, 48, 31, AESCounterMode, 128, HMACSHA1, 80, 80, 160, 160 },
-    { (char*) "AES_CM_128_HMAC_SHA1_32", 128, 112, 48, 31, AESCounterMode, 128, HMACSHA1, 32, 80, 160, 160 },
-    { (char*) "F8_128_HMAC_SHA1_80", 128, 112, 48, 31, AESF8Mode, 128, HMACSHA1, 80, 80, 160, 160 }
+    { "AES_CM_128_HMAC_SHA1_80", 128, 112, 48, 31, AESCounterMode, 128, HMACSHA1, 80, 80, 160, 160 },
+    { "AES_CM_128_HMAC_SHA1_32", 128, 112, 48, 31, AESCounterMode, 128, HMACSHA1, 32, 80, 160, 160 },
+    { "F8_128_HMAC_SHA1_80", 128, 112, 48, 31, AESF8Mode, 128, HMACSHA1, 80, 80, 160, 160 }
 };
 
 
-- 
GitLab