antirez / antirez/lua-cmsgpack

Wrong size passed into realloc on delete of buf

Open
#41 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
383
Forks
122
PR merge metrics
No merged PRs in 30d

Description

In mp_buf_free in file lua_cmsgpack.c line 133 reads mp_realloc(buf->L, buf->b, buf->len, 0); when it should read mp_realloc(buf->L, buf->b, buf->len + buf->free, 0);

realloc is passed the wrong osize. That can be problematic if the implementation of realloc is sensitive to it.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.