Skip to content

Commit

Permalink
Merge pull request #7 from pandax381/fix-issuse_6
Browse files Browse the repository at this point in the history
in_mem: fix overflow when reading in_mem generated msgpack maps #6
  • Loading branch information
edsiper committed Jun 3, 2015
2 parents 09003d1 + c4233b7 commit e5af33e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions plugins/in_mem/in_mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ void *in_mem_flush(void *in_context, int *size)
return NULL;
}
memcpy(buf, ctx->sbuf.data, ctx->sbuf.size);
*size = ctx->sbuf.size;
msgpack_sbuffer_destroy(&ctx->sbuf);
msgpack_sbuffer_init(&ctx->sbuf);
msgpack_packer_init(&ctx->pckr, &ctx->sbuf, msgpack_sbuffer_write);
Expand Down

0 comments on commit e5af33e

Please sign in to comment.