提交 ed276a10 authored 作者: Travis Cross's avatar Travis Cross

Fix memory corruption in mod_erlang_event

Thanks-to: Alexandre Snarskii <snar@snar.spb.ru>

FS-5465 --resolve
上级 4b2dd0a8
......@@ -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;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论