From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753342AbdJHInx (ORCPT ); Sun, 8 Oct 2017 04:43:53 -0400 Received: from ozlabs.org ([103.22.144.67]:36967 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753245AbdJHInj (ORCPT ); Sun, 8 Oct 2017 04:43:39 -0400 X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 06755a871314c7443a89c09650cdb3982466e1a8 In-Reply-To: <20170928133426.19454-1-seth.forshee@canonical.com> To: Seth Forshee , Benjamin Herrenschmidt , Paul Mackerras , Shuah Khan From: Michael Ellerman Cc: Seth Forshee , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: selftests/powerpc: Use snprintf to construct DSCR sysfs interface paths Message-Id: <3y8xjj5K9Mz9t5R@ozlabs.org> Date: Sun, 8 Oct 2017 19:43:37 +1100 (AEDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2017-09-28 at 13:34:26 UTC, Seth Forshee wrote: > Currently sprintf is used, and while paths should never exceed > the size of the buffer it is theoretically possible since > dirent.d_name is 256 bytes. As a result this trips > -Wformat-overflow, and since the test is built with -Wall -Werror > the causes the build to fail. Switch to using snprintf and skip > any paths which are too long for the filename buffer. > > Signed-off-by: Seth Forshee Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/06755a871314c7443a89c09650cdb3 cheers