Tarantool development patches archive
 help / color / mirror / Atom feed
From: Konstantin Osipov <kostja@tarantool.org>
To: tarantool-patches@freelists.org
Cc: vdavydov.dev@gmail.com, Serge Petrenko <sergepetrenko@tarantool.org>
Subject: Re: [tarantool-patches] [PATCH v2 2/2] recovery: fix incorrect handling of empty-body requests.
Date: Wed, 26 Sep 2018 01:33:19 +0300	[thread overview]
Message-ID: <20180925223319.GD3137@chai> (raw)
In-Reply-To: <a4e80c4c9d1642e017559b1949b65360057085a0.1537797732.git.sergepetrenko@tarantool.org>

* Serge Petrenko <sergepetrenko@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

  reply	other threads:[~2018-09-25 22:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-24 14:08 [PATCH v2 0/2] fix bodiless requests handling Serge Petrenko
2018-09-24 14:08 ` [PATCH v2 1/2] tarantoolctl: fix cat and play for empty body requests Serge Petrenko
2018-09-25 22:31   ` [tarantool-patches] " Konstantin Osipov
2018-09-24 14:08 ` [PATCH v2 2/2] recovery: fix incorrect handling of empty-body requests Serge Petrenko
2018-09-25 22:33   ` Konstantin Osipov [this message]
2018-09-25 14:37 ` [PATCH v2 0/2] fix bodiless requests handling Vladimir Davydov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180925223319.GD3137@chai \
    --to=kostja@tarantool.org \
    --cc=sergepetrenko@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [tarantool-patches] [PATCH v2 2/2] recovery: fix incorrect handling of empty-body requests.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox