[asterisk-commits] oej: branch oej/lingon-srtp-key-lifetime-1.8 r402877 - /team/oej/lingon-srtp-...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 18 08:20:00 CST 2013


Author: oej
Date: Mon Nov 18 08:19:56 2013
New Revision: 402877

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402877
Log:
Please make sure you always check a pointer before using it. Note that it may very well be null at any point in time.
Thank you for your attention and have a nice hacker day!

Modified:
    team/oej/lingon-srtp-key-lifetime-1.8/channels/sip/sdp_crypto.c

Modified: team/oej/lingon-srtp-key-lifetime-1.8/channels/sip/sdp_crypto.c
URL: http://svnview.digium.com/svn/asterisk/team/oej/lingon-srtp-key-lifetime-1.8/channels/sip/sdp_crypto.c?view=diff&rev=402877&r1=402876&r2=402877
==============================================================================
--- team/oej/lingon-srtp-key-lifetime-1.8/channels/sip/sdp_crypto.c (original)
+++ team/oej/lingon-srtp-key-lifetime-1.8/channels/sip/sdp_crypto.c Mon Nov 18 08:19:56 2013
@@ -295,7 +295,7 @@
 					mki = strsep(&info, "|");
 				}
 				/* At this point we do not support multiple keys, sorry */
-				if (*mki != '1') {
+				if (mki != NULL && *mki != '1') {
 					ast_log(LOG_ERROR, "Crypto mki handling not implemented. MKI = %s \n", mki);
 					continue;
 				}
@@ -303,7 +303,7 @@
 
 			}
 			
-			ast_debug(3, "==> SRTP SDES lifetime %s MKI %s \n", lifetime ? lifetime : "-", mki?mki : "-");
+			ast_debug(3, "==> SRTP SDES lifetime %s MKI %s \n", lifetime ? lifetime : "-", mki ? mki : "-");
 
 			if (lifetime) {
 				if (strlen(lifetime) > 2) {




More information about the asterisk-commits mailing list