[tarantool-patches] [PATCH v2 2/2] recovery: fix incorrect handling of empty-body requests.

Konstantin Osipov kostja at tarantool.org
Wed Sep 26 01:33:19 MSK 2018


* Serge Petrenko <sergepetrenko at tarantool.org> [18/09/24 18:11]:
> diff --git a/src/box/xrow.c b/src/box/xrow.c
> index 7a35d0db1..4473acfe3 100644
> --- a/src/box/xrow.c
> +++ b/src/box/xrow.c
> @@ -135,7 +135,8 @@ error:
>  		}
>  	}
>  	assert(*pos <= end);
> -	if (*pos < end) {
> +	/* Nop requests aren't supposed to have a body. */
> +	if (*pos < end && header->type != IPROTO_NOP) {
>  		const char *body = *pos;
>  		if (mp_check(pos, end)) {
>  			diag_set(ClientError, ER_INVALID_MSGPACK, "packet body");

This patch LGTM.

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.io - www.twitter.com/kostja_osipov



More information about the Tarantool-patches mailing list