aboutsummaryrefslogtreecommitdiffstats
path: root/channels/sip/reqresp_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/sip/reqresp_parser.c')
-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;
}