Fix buffer end pointer comparison in maxavro
The buffer pointer can point to the end pointer if it is the last value in the buffer.
This commit is contained in:
@ -144,7 +144,7 @@ char* maxavro_read_string(MAXAVRO_FILE* file, size_t* size)
|
|||||||
|
|
||||||
if (maxavro_read_integer(file, &len))
|
if (maxavro_read_integer(file, &len))
|
||||||
{
|
{
|
||||||
if (file->buffer_ptr + len < file->buffer_end)
|
if (file->buffer_ptr + len <= file->buffer_end)
|
||||||
{
|
{
|
||||||
key = MXS_MALLOC(len + 1);
|
key = MXS_MALLOC(len + 1);
|
||||||
if (key)
|
if (key)
|
||||||
|
Reference in New Issue
Block a user