[Tarantool-patches] [PATCH 2/6] sql: fix possible null dereference in sql_expr_coll()

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Fri Nov 29 01:42:02 MSK 2019


Thanks for the patch!

Is it possible to test this?

On 27/11/2019 13:15, Nikita Pettik wrote:
> ---
>  src/box/sql/expr.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/box/sql/expr.c b/src/box/sql/expr.c
> index 648b7170e..0bdcfe576 100644
> --- a/src/box/sql/expr.c
> +++ b/src/box/sql/expr.c
> @@ -332,7 +332,8 @@ sql_expr_coll(Parse *parse, Expr *p, bool *is_explicit_coll, uint32_t *coll_id,
>  				sql_func_by_signature(p->u.zToken, arg_count);
>  			if (func == NULL)
>  				break;
> -			if (sql_func_flag_is_set(func, SQL_FUNC_DERIVEDCOLL)) {
> +			if (sql_func_flag_is_set(func, SQL_FUNC_DERIVEDCOLL) &&
> +			    arg_count > 0) {
>  				/*
>  				 * Now we use quite straightforward
>  				 * approach assuming that resulting
> 


More information about the Tarantool-patches mailing list