From patchwork Fri Aug 16 06:42: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: 171463 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp448291ily; Thu, 15 Aug 2019 23:42:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqzvZXEtQ0mjXmFObyqMeDE2GUhav+MKobyWTcs36S4eQbVsAczxMJ3BOIDeLtidiw20XCtV X-Received: by 2002:a63:a302:: with SMTP id s2mr6492080pge.125.1565937744140; Thu, 15 Aug 2019 23:42:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565937744; cv=none; d=google.com; s=arc-20160816; b=jr9vWTdU7+JG14MIRyFdzsfRPKCaOhm4Fn03oCuu0c9MlQhUiOjdQCsnKeHRNVz61f GHKp7NJHr13q3ZhFPGOI0v/po5axxcWhl8zE4agWlAZ8sF06FyhWRnT46kxBOegzYOet DSsVbROMhKqjggKmiU5Ju9AFcqPGhq77skB3yaaN5v5JRROfS/Ob3wO0YQ+VRjyc2LNe AaT4MoFd8g39i8FFexUVnPUjHjWkZIOp4m4krMoV7bOecVwBGJy6PsYUcVXV+xBAN4Dk H5KIlmXlViAUq9H25EQRbqkEMndWR9/XF9VV8c7YG9LjWOcFRFOruSM8j0ehJ7Usl+mk bwRw== 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=5obUNy7MWqG4CAxsyt3EfH90Meaub7sdEyMYieDbNxU=; b=xT8vwx3fkWcSnG2r3HC4yti/9ZLwAw4JGuKDo3gdkTq1Fsyo1BhQHn2yhhiXWcZSYB aDRmSq92qVs6+3qPgYl6mIuBcKv4eyR0Mp1G4Zv3N5+mWcYzXZg+2BtLaDyxO34Lt0jH 7t+nE1cI7ASYKLHDyfSd685LXE5geFA5DTT6IOOCZcDx5dp3TzEY0qdQuaFlDwmjHFi/ sahuQbqIloYg3RzS/XmGlFbWLf1PV8MDE5nQCcp60cGZB6Ep0/H0SOULm/mSIT5IGwuv xBETiZftjvD8U5S8Mto3B8RIPMycSNr8x1spi9JTofyScIn4YxC9BvzN/owcGG5AwJd/ jM/g== 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 i18si3807495pfq.58.2019.08.15.23.42.23; Thu, 15 Aug 2019 23:42:24 -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 S1726880AbfHPGmX (ORCPT + 3 others); Fri, 16 Aug 2019 02:42:23 -0400 Received: from mail.monom.org ([188.138.9.77]:52482 "EHLO mail.monom.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726767AbfHPGmX (ORCPT ); Fri, 16 Aug 2019 02:42:23 -0400 Received: from mail.monom.org (localhost [127.0.0.1]) by filter.mynetwork.local (Postfix) with ESMTP id 45C8E5006DE; Fri, 16 Aug 2019 08:42:21 +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 05F1150093C; Fri, 16 Aug 2019 08:42:20 +0200 (CEST) From: Daniel Wagner To: Clark Williams , John Kacur Cc: linux-rt-users@vger.kernel.org, Daniel Wagner Subject: [PATCH rt-tests v0 2/4] sigwaittest: Increase buffer to avoid overflow Date: Fri, 16 Aug 2019 08:42:02 +0200 Message-Id: <20190816064204.6339-3-wagi@monom.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190816064204.6339-1-wagi@monom.org> References: <20190816064204.6339-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 diff --git a/src/sigwaittest/sigwaittest.c b/src/sigwaittest/sigwaittest.c index 59f28a5babcb..a98332f13e38 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[32]; struct timespec launchdelay, maindelay; process_options(argc, argv);