mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-06 02:22:56 +00:00
Skinny: avoid stack overflow by lowering button_template_helper size
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16875 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
36e623a11f
commit
76be99c801
@ -1445,7 +1445,7 @@ switch_status_t skinny_handle_port_message(listener_t *listener, skinny_message_
|
|||||||
|
|
||||||
struct button_template_helper {
|
struct button_template_helper {
|
||||||
skinny_message_t *message;
|
skinny_message_t *message;
|
||||||
int count[0xffff+1];
|
int count[SKINNY_BUTTON_UNDEFINED+1];
|
||||||
};
|
};
|
||||||
|
|
||||||
int skinny_handle_button_template_request_callback(void *pArg, int argc, char **argv, char **columnNames)
|
int skinny_handle_button_template_request_callback(void *pArg, int argc, char **argv, char **columnNames)
|
||||||
@ -1457,6 +1457,9 @@ int skinny_handle_button_template_request_callback(void *pArg, int argc, char **
|
|||||||
uint32_t type = atoi(argv[2]);
|
uint32_t type = atoi(argv[2]);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if(type > SKINNY_BUTTON_UNDEFINED) {
|
||||||
|
type = SKINNY_BUTTON_UNDEFINED;
|
||||||
|
}
|
||||||
/* fill buttons between previous one and current one */
|
/* fill buttons between previous one and current one */
|
||||||
for(i = message->data.button_template.button_count; i+1 < position; i++) {
|
for(i = message->data.button_template.button_count; i+1 < position; i++) {
|
||||||
message->data.button_template.btn[i].instance_number = ++helper->count[SKINNY_BUTTON_UNDEFINED];
|
message->data.button_template.btn[i].instance_number = ++helper->count[SKINNY_BUTTON_UNDEFINED];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user