cleanups and a check to bail on woomera messages with too many params instead of segfaulting.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6817 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
89ba8e6195
commit
8bc983a758
|
@ -557,9 +557,11 @@ static void woomera_printf(woomera_profile * profile, switch_socket_t * socket,
|
|||
va_start(ap, fmt);
|
||||
#ifndef vasprintf
|
||||
stuff = (char *) malloc(10240);
|
||||
switch_assert(stuff);
|
||||
vsnprintf(stuff, 10240, fmt, ap);
|
||||
#else
|
||||
res = vasprintf(&stuff, fmt, ap);
|
||||
switch_assert(stuff);
|
||||
#endif
|
||||
va_end(ap);
|
||||
if (res == -1) {
|
||||
|
@ -694,6 +696,9 @@ static int woomera_message_parse(switch_socket_t * fd, woomera_message * wmsg, i
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (wmsg->last > WOOMERA_ARRAY_LEN) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (!cur || !cur[0]) {
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue