From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB6BCC3A59D for ; Mon, 19 Aug 2019 06:43:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C1EEC20874 for ; Mon, 19 Aug 2019 06:43:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726752AbfHSGnM (ORCPT ); Mon, 19 Aug 2019 02:43:12 -0400 Received: from mail.monom.org ([188.138.9.77]:33092 "EHLO mail.monom.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726491AbfHSGnM (ORCPT ); Mon, 19 Aug 2019 02:43:12 -0400 Received: from mail.monom.org (localhost [127.0.0.1]) by filter.mynetwork.local (Postfix) with ESMTP id 4A43D500697; Mon, 19 Aug 2019 08:43:10 +0200 (CEST) Received: from localhost (b9168f76.cgn.dg-w.de [185.22.143.118]) by mail.monom.org (Postfix) with ESMTPSA id 22BF35007D2; Mon, 19 Aug 2019 08:43:10 +0200 (CEST) From: Daniel Wagner To: Clark Williams , John Kacur Cc: linux-rt-users@vger.kernel.org, Daniel Wagner Subject: [PATCH rt-tests v1 v1 2/4] sigwaittest: Increase buffer to avoid overflow Date: Mon, 19 Aug 2019 08:43:02 +0200 Message-Id: <20190819064304.4676-3-wagi@monom.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190819064304.4676-1-wagi@monom.org> References: <20190819064304.4676-1-wagi@monom.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-rt-users-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rt-users@vger.kernel.org Increase the size of the char buffer. gcc 9.1.1 reports: src/sigwaittest/sigwaittest.c:494:5: note: ‘sprintf’ output between 5 and 14 bytes into a destination of size 8 494 | sprintf(f_opt, "-fr%d", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ src/sigwaittest/sigwaittest.c:522:24: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size 5 [-Wformat-overflow=] 522 | sprintf(f_opt, "-fs%d", i); | ^~ Signed-off-by: Daniel Wagner --- src/sigwaittest/sigwaittest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sigwaittest/sigwaittest.c b/src/sigwaittest/sigwaittest.c index 59f28a5babcb..2d0c04132fa7 100644 --- a/src/sigwaittest/sigwaittest.c +++ b/src/sigwaittest/sigwaittest.c @@ -352,7 +352,7 @@ int main(int argc, char *argv[]) struct params *sender = NULL; sigset_t sigset; void *param = NULL; - char f_opt[8]; + char f_opt[14]; struct timespec launchdelay, maindelay; process_options(argc, argv); -- 2.21.0