From: Zhiqiang Liu Subject: Re: [dm- devel][PATCH] checker: add input check of state in checker_state_name func Date: Mon, 10 Aug 2020 19:38:14 +0800 Message-ID: References: <9c67963b-477f-b3f5-8c8c-048de9357ff9@huawei.com> <2625305858d9381eb1f69642d6bbcd743a995af2.camel@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <2625305858d9381eb1f69642d6bbcd743a995af2.camel@suse.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Martin Wilck , Benjamin Marzinski , christophe.varoqui@opensvc.com, zkabelac@redhat.com Cc: linfeilong , Yanxiaodan , dm-devel@redhat.com, lixiaokeng List-Id: dm-devel.ids On 2020/8/10 18:17, Martin Wilck wrote: > On Mon, 2020-08-10 at 09:14 +0800, Zhiqiang Liu wrote: >> In checker_state_name func, we donot check whether input i >> is valid. It may cause array access violation problem. >> >> Signed-off-by: Zhiqiang Liu >> --- >> libmultipath/checkers.c | 26 +++++++++++++++----------- >> libmultipath/checkers.h | 3 ++- >> 2 files changed, 17 insertions(+), 12 deletions(-) >> > > Reviewed-by: Martin Wilck > > Thanks for the patch. > > Btw, are you currently reviewing multipath-tools with coverity or some > similar tool? > > Martin Thanks for your reply. Actually, I just read and learned multipath-tools code without using any tools. In the future, we may try to use some scanning tools for deep analysis. Thanks for your review, again.