mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-04 18:27:36 +00:00
Fix memory corruption in mod_erlang_event
Thanks-to: Alexandre Snarskii <snar@snar.spb.ru> FS-5465 --resolve
This commit is contained in:
parent
012003b5ff
commit
c09a261d58
@ -184,7 +184,7 @@ static switch_status_t handle_msg_fetch_reply(listener_t *listener, ei_x_buff *
|
||||
/* alright, we've got the lock and we're the first to reply */
|
||||
|
||||
/* clone the reply so it doesn't get destroyed on us */
|
||||
ei_x_buff *nbuf = malloc(sizeof(nbuf));
|
||||
ei_x_buff *nbuf = malloc(sizeof(*nbuf));
|
||||
nbuf->buff = malloc(buf->buffsz);
|
||||
memcpy(nbuf->buff, buf->buff, buf->buffsz);
|
||||
nbuf->index = buf->index;
|
||||
|
Loading…
x
Reference in New Issue
Block a user