forked from Mirrors/freeswitch
Merge pull request #1420 from signalwire/voicemail-ivr-overflow
[mod_voicemail_ivr] Fix array overflow
This commit is contained in:
commit
de70d9d493
|
@ -730,13 +730,15 @@ char *vmivr_menu_get_input_set(switch_core_session_t *session, vmivr_profile_t *
|
|||
|
||||
for (retry = menu->ivr_maximum_attempts; switch_channel_ready(channel) && retry > 0; retry--) {
|
||||
int i;
|
||||
int dtmfa_array_length = 0;
|
||||
|
||||
menu_instance_init(menu);
|
||||
|
||||
switch_event_add_header(menu->phrase_params, SWITCH_STACK_BOTTOM, "IVR-Retry-Left", "%d", retry);
|
||||
|
||||
/* Find the last entry and append this one to it */
|
||||
for (i=0; i < 16 && menu->dtmfa[i]; i++){
|
||||
dtmfa_array_length = sizeof(menu->dtmfa) / sizeof(menu->dtmfa[0]);
|
||||
for (i = 0; i < (dtmfa_array_length - 1) && menu->dtmfa[i]; i++){
|
||||
}
|
||||
menu->dtmfa[i] = (char *) input_mask;
|
||||
|
||||
|
|
Loading…
Reference in New Issue