From patchwork Mon Aug 19 06:43:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 171581 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp2570224ily; Sun, 18 Aug 2019 23:43:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqziIKJskiOZyFz9tPDdU7WJ5lCd2Q+a0HaRI4pXWO/ocBwa7Saa1SKlWA8c/9QBCYJTZynp X-Received: by 2002:aa7:8c4c:: with SMTP id e12mr22722199pfd.258.1566196992994; Sun, 18 Aug 2019 23:43:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566196992; cv=none; d=google.com; s=arc-20160816; b=bd7UII4huRPtOc7dVKcMWVQRQgX7+v5/b/aDgmyMVTE8FHf7vaaHwW+COfKeORtUDI Ag/n+0rI+93pc5Ws4VHBrS/muoNPqY2mkyk6lN8iAdygjcwAcEW6yYA+twAciy6ugbG0 pMN69hDx0iTE3Ywi+NJbULu4NZnE+c5cuVykkOjqdeeBd7Cj1nTyz6VUOe5KqE/tgM4R BoT49J+VAcMdDfL+bvaoNB/Xp7ZC5Djd/zkYB9YJSIhzZw1bGsLVJ26h36VKCr9GCxhc gt2/rIYt+LxPrVHnPFdt5+pkK8Fxr2uhvmMgO8qEoNHBfJbWNrNoboDrwZ3li0KO/Gs8 6r6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=BAHStXkIOLXlNGofbGssHAaFc1KtuZxaUIU5t7q/sAU=; b=1DaaY23b5Vci62SOCJgFMTuMLKGetNlbGXe7VN28d0bqXR7vFQwullXyXPlFLm8UpE zt6Dfbm53nzntlU7WdLShFZSJBip26BRK4cNYyBSAGUzfbOnQcTiNywAwoIvEFq0ZeWj +FHpG66hWDM1clndRxHpZ0OphEnhnXBOxBK7NPiwq2YstT++G3gyfIDiKwf9wGkF6cw+ 5r5mI/i9xPIJ7kuYf0A2EJtmFGhvXGu1yvBSdHa+CRCfGGK7JVLLbXh0aNjetxJafTHH FhFpc9I/5KYca85f0Xi17iWod1Ay0XsRP1FZo+yQyPRu58EvlcYJZtHCQwy0dHkaYP/+ qSOw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-rt-users-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-rt-users-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=monom.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v33si9200842pgk.152.2019.08.18.23.43.12; Sun, 18 Aug 2019 23:43:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-rt-users-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-rt-users-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-rt-users-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=monom.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726752AbfHSGnM (ORCPT + 3 others); 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) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.monom.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.2 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 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(-) -- 2.21.0 Signed-off-by: John Kacur 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);