aboutsummaryrefslogtreecommitdiffstats
path: root/channels/sip
diff options
context:
space:
mode:
authormarkm <markm@f38db490-d61c-443f-a65b-d21fe96a405b>2011-05-26 21:50:06 +0000
committermarkm <markm@f38db490-d61c-443f-a65b-d21fe96a405b>2011-05-26 21:50:06 +0000
commit570da4c7e7363678dbee2e66ba471b2b570c1ca4 (patch)
treeeba7221818f8515673f9c1b27b78c1ad6f05f2cc /channels/sip
parentdeba23ad2315a9a8d67614b4be6d5da45d05ec04 (diff)
Merged revisions 321155 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r321155 | markm | 2011-05-26 17:48:45 -0400 (Thu, 26 May 2011) | 10 lines Fixed build problem with dev mode enabled, which was caused by commit 321100. Reformulated patch to be more generic. Moved the sip uri parse variable initalization to parse_uri_full in reqresp_parser.c. This will ensure that any use of parse uri will have null output variables if the parse fails. (closes issue #19346) Reported by: kobaz Tested by: kobaz,JonathanRose Review: [full review board URL with trailing slash] ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@321156 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/sip')
-rw-r--r--channels/sip/reqresp_parser.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/channels/sip/reqresp_parser.c b/channels/sip/reqresp_parser.c
index 64b0db31f..6cab6f149 100644
--- a/channels/sip/reqresp_parser.c
+++ b/channels/sip/reqresp_parser.c
@@ -44,6 +44,23 @@ int parse_uri_full(char *uri, const char *scheme, char **user, char **pass,
/* check for valid input */
if (ast_strlen_zero(uri)) {
+ /* make sure we leave nothing undefined after we exit */
+ if (user) {
+ *user = "";
+ }
+ if (pass) {
+ *pass = "";
+ }
+ if (domain) {
+ *domain = "";
+ }
+ if (headers) {
+ *headers = "";
+ }
+ if (residue) {
+ *residue = "";
+ }
+
return -1;
}