From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 483D22DBB6 for ; Fri, 6 Apr 2018 12:24:50 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id maEaYAFgIJld for ; Fri, 6 Apr 2018 12:24:50 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 06A4C2DBB5 for ; Fri, 6 Apr 2018 12:24:50 -0400 (EDT) From: Kirill Shcherbatov Subject: [tarantool-patches] [PATCH v2 1/2] Fixed invalid check in lbox_tuple_transform. Date: Fri, 6 Apr 2018 19:24:41 +0300 Message-Id: <5d4367fda9fdbb98d9c34b1a001e6f867f617bc2.1523031806.git.kshcherbatov@tarantool.org> In-Reply-To: References: In-Reply-To: References: Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: v.shpilevoy@tarantool.org, Kirill Shcherbatov Tuple has been checked instead of new_tuple returned as box_tuple_update result. --- src/box/lua/tuple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/box/lua/tuple.c b/src/box/lua/tuple.c index 7ca4299..47b33c9 100644 --- a/src/box/lua/tuple.c +++ b/src/box/lua/tuple.c @@ -393,7 +393,7 @@ lbox_tuple_transform(struct lua_State *L) /* Execute tuple_update */ struct tuple *new_tuple = box_tuple_update(tuple, buf->buf, buf->buf + ibuf_used(buf)); - if (tuple == NULL) + if (new_tuple == NULL) luaT_error(L); /* box_tuple_update() doesn't leak on exception, see public API doc */ luaT_pushtuple(L, new_tuple); -- 2.7.4