mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-05 02:02:01 +00:00
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);
|
va_start(ap, fmt);
|
||||||
#ifndef vasprintf
|
#ifndef vasprintf
|
||||||
stuff = (char *) malloc(10240);
|
stuff = (char *) malloc(10240);
|
||||||
|
switch_assert(stuff);
|
||||||
vsnprintf(stuff, 10240, fmt, ap);
|
vsnprintf(stuff, 10240, fmt, ap);
|
||||||
#else
|
#else
|
||||||
res = vasprintf(&stuff, fmt, ap);
|
res = vasprintf(&stuff, fmt, ap);
|
||||||
|
switch_assert(stuff);
|
||||||
#endif
|
#endif
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
if (res == -1) {
|
if (res == -1) {
|
||||||
@ -694,6 +696,9 @@ static int woomera_message_parse(switch_socket_t * fd, woomera_message * wmsg, i
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (wmsg->last > WOOMERA_ARRAY_LEN) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (!cur || !cur[0]) {
|
if (!cur || !cur[0]) {
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user