mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 11:28:25 +00:00
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: https://origsvn.digium.com/svn/asterisk/branches/1.8@321155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user