mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-05 18:13:27 +00:00
[mod_rayo] Fix heap use after free and a possible buffer overflow.
This commit is contained in:
parent
7effdf0565
commit
852e4a9471
@ -4854,7 +4854,7 @@ static int alias_api(struct rayo_cmd_alias *alias, char *args, switch_stream_han
|
|||||||
cmd = strdup(alias->cmd);
|
cmd = strdup(alias->cmd);
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
char *cmd_new;
|
char *cmd_new;
|
||||||
char to_replace[4] = { 0 };
|
char to_replace[12] = { 0 };
|
||||||
sprintf(to_replace, "$%i", i);
|
sprintf(to_replace, "$%i", i);
|
||||||
cmd_new = switch_string_replace(cmd, to_replace, argv[i]);
|
cmd_new = switch_string_replace(cmd, to_replace, argv[i]);
|
||||||
free(cmd);
|
free(cmd);
|
||||||
|
@ -851,8 +851,8 @@ static void srgs_grammar_destroy(struct srgs_grammar *grammar)
|
|||||||
if (grammar->jsgf_file_name) {
|
if (grammar->jsgf_file_name) {
|
||||||
switch_file_remove(grammar->jsgf_file_name, pool);
|
switch_file_remove(grammar->jsgf_file_name, pool);
|
||||||
}
|
}
|
||||||
switch_core_destroy_memory_pool(&pool);
|
|
||||||
switch_core_hash_destroy(&grammar->rules);
|
switch_core_hash_destroy(&grammar->rules);
|
||||||
|
switch_core_destroy_memory_pool(&pool);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user