...
|
...
|
@@ -166,10 +166,13 @@ int append_branch(struct sip_msg* msg, char* uri, int uri_len, char* dst_uri, in
|
166
|
166
|
branches[nr_branches].len = uri_len;
|
167
|
167
|
branches[nr_branches].q = q;
|
168
|
168
|
|
169
|
|
- if (dst_uri) {
|
170
|
|
- memcpy(branches[nr_branches].dst_uri, dst_uri, dst_uri_len);
|
171
|
|
- branches[nr_branches].dst_uri[dst_uri_len] = 0;
|
172
|
|
- branches[nr_branches].dst_uri_len = dst_uri_len;
|
|
169
|
+ if (dst_uri && dst_uri_len) {
|
|
170
|
+ memcpy(branches[nr_branches].dst_uri, dst_uri, dst_uri_len);
|
|
171
|
+ branches[nr_branches].dst_uri[dst_uri_len] = 0;
|
|
172
|
+ branches[nr_branches].dst_uri_len = dst_uri_len;
|
|
173
|
+ } else {
|
|
174
|
+ branches[nr_branches].dst_uri[0] = '\0';
|
|
175
|
+ branches[nr_branches].dst_uri_len = 0;
|
173
|
176
|
}
|
174
|
177
|
|
175
|
178
|
nr_branches++;
|