mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
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:
@@ -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);
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user