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:
Markus Mäkelä 2019-06-11 08:52:25 +03:00
parent ce3d7acf2d
commit 4716f5b48f
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -144,7 +144,7 @@ char* maxavro_read_string(MAXAVRO_FILE* file, size_t* size)
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);
if (key)