[asterisk-commits] lmadsen: tag 1.8.4.2 r321557 - /tags/1.8.4.2/channels/sip/reqresp_parser.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jun 2 08:47:41 CDT 2011


Author: lmadsen
Date: Thu Jun  2 08:47:36 2011
New Revision: 321557

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=321557
Log:
Changes for AST-2011-007.

Modified:
    tags/1.8.4.2/channels/sip/reqresp_parser.c

Modified: tags/1.8.4.2/channels/sip/reqresp_parser.c
URL: http://svnview.digium.com/svn/asterisk/tags/1.8.4.2/channels/sip/reqresp_parser.c?view=diff&rev=321557&r1=321556&r2=321557
==============================================================================
--- tags/1.8.4.2/channels/sip/reqresp_parser.c (original)
+++ tags/1.8.4.2/channels/sip/reqresp_parser.c Thu Jun  2 08:47:36 2011
@@ -41,6 +41,27 @@
 	char *endparams = NULL;
 	char *c = NULL;
 	int error = 0;
+
+	/*
+	 * Initialize requested strings - some functions don't care if parse_uri fails
+	 * and will attempt to use string pointers passed into parse_uri even after a
+	 * parse_uri failure
+	 */
+	if (user) {
+		*user = "";
+	}
+	if (pass) {
+		*pass = "";
+	}
+	if (domain) {
+		*domain = "";
+	}
+	if (headers) {
+		*headers = "";
+	}
+	if (residue) {
+		*residue = "";
+	}
 
 	/* check for valid input */
 	if (ast_strlen_zero(uri)) {




More information about the asterisk-commits mailing list