switch_url_encode now takes the full length of the buffer and null-terminates the string properly (Klocwork #1030)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8510 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Stefan Knoblich
2008-05-21 21:31:17 +00:00
parent a35dddbfc0
commit 5d91bea365
6 changed files with 16 additions and 14 deletions

View File

@@ -1877,7 +1877,7 @@ SWITCH_DECLARE(char *) switch_channel_build_param_string(switch_channel_t *chann
encode_buf = tmp;
}
switch_url_encode(prof[x], encode_buf, encode_len - 1);
switch_url_encode(prof[x], encode_buf, encode_len);
stream.write_function(&stream, "%s=%s&", prof_names[x], encode_buf);
}
@@ -1897,7 +1897,7 @@ SWITCH_DECLARE(char *) switch_channel_build_param_string(switch_channel_t *chann
encode_buf = tmp;
}
switch_url_encode((char *) val, encode_buf, encode_len - 1);
switch_url_encode((char *) val, encode_buf, encode_len);
stream.write_function(&stream, "%s=%s&", (char *) var, encode_buf);
}