Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751546AbdIABpT (ORCPT ); Thu, 31 Aug 2017 21:45:19 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59142 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751040AbdIABpR (ORCPT ); Thu, 31 Aug 2017 21:45:17 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1B07560794 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org Date: Thu, 31 Aug 2017 18:45:15 -0700 From: Stephen Boyd To: Colin King Cc: Tero Kristo , Michael Turquette , linux-omap@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] clk: ti: check for null return in strrchr to avoid null dereferencing Message-ID: <20170901014515.GW21656@codeaurora.org> References: <20170726235627.9163-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170726235627.9163-1-colin.king@canonical.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 548 Lines: 17 On 07/27, Colin King wrote: > From: Colin Ian King > > strrchr can potentially return a null so the following strlen on the > null pointer can cause a null dereference. Add a check to see if > the string postfix is not null before calling strlen. > > Detected by CoverityScan, CID#1452039 ("Dereference null return") > > Signed-off-by: Colin Ian King > --- Applied to clk-next -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project