Harden wayvncctl client json message parsing

This allows proper parsing of back-to-back incoming json
events/responses.

Signed-off-by: Jim Ramsay <i.am@jimramsay.com>
pull/237/head
Jim Ramsay 2023-02-26 06:21:36 -05:00
parent 80c25e7820
commit e3ea6652f0
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ static json_t* json_from_buffer(struct ctl_client* self)
}
json_error_t err;
json_t* root = json_loadb(self->read_buffer, self->read_len, 0, &err);
json_t* root = json_loadb(self->read_buffer, self->read_len, JSON_DISABLE_EOF_CHECK, &err);
if (root) {
advance_read_buffer(&self->read_buffer, &self->read_len,
err.position);