From patchwork Mon Aug 19 06:43:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 171580 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp2570209ily; Sun, 18 Aug 2019 23:43:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwsQPQCWIEhV9vjmX/M2L9X/mhOrK1asp84PPpUufjE8QvfItByHqc1R9FWEyQA3/QUkwDO X-Received: by 2002:a63:f926:: with SMTP id h38mr18470013pgi.80.1566196992363; 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=E95saKBgVKpAqq64tp/mvlYPaWUIxYQj26ZxSU9jHwnV4YcyclUL5PChspqcqGdfC9 MKq3KkEOtqMS/gbLFzFSJpruzyvBclwtMCAJhmA78kQ+e6QQrjIF1v9wabDJghhSe8zw 7WYRtZ2+mFsF0sWweCoxWkvxLxnymJig+uGkKAXzaew74wgoZGAeML6DicOUTT4PArz9 vNsk+U+3aCgFLZKSv6jmI/wzw/vZz6YG+GHQkhFTYe14jYi6CvIF9Hau/BtUf3LlheVX MxASotGbL9mWxWRcDPgNPQFXKp2QyL5cP2QlKS4oDMQBW2a1aI8VF9jMIdtEH3kJkIYV U3yQ== 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=icRfFopwVUOQqbACKFS2ZIzeZCcPkfVMAVyZ/zKbcns=; b=I7ehyhJCwT196KA1lt/3knmu6EmmGaKTyPuSWXre4mzPuH8g/dujZfcqzK0cw1MMJS 0DYGMgm/3QVpY0QwbjCEA9gaNYx5r2nofrFFBNrIOiC/QY+H9QPqpilHy0g7rWGVH2H7 pG3eejuvgroI9GnVOUFLVS7j3yx7cFmOMszdeVk0z27Gh9HneLr1PpJ9T14D0EQPXPY6 0mFwGox0SU8u6js/Us+onjFDP1BDTn3WW7vSEASPBzr7FArlWVEifo/FUJ7mqALrWgSz zQmQToeVUP3BCdhLdwdZMRproRXcfB2A4y/YOu1RWyEMB+0T2y3WF477bMwgMNrHrG2w jXwQ== 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 S1726708AbfHSGnL (ORCPT + 3 others); Mon, 19 Aug 2019 02:43:11 -0400 Received: from mail.monom.org ([188.138.9.77]:33084 "EHLO mail.monom.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725790AbfHSGnL (ORCPT ); Mon, 19 Aug 2019 02:43:11 -0400 Received: from mail.monom.org (localhost [127.0.0.1]) by filter.mynetwork.local (Postfix) with ESMTP id BC567500294; Mon, 19 Aug 2019 08:43:09 +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 A3249500797; Mon, 19 Aug 2019 08:43:09 +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 1/4] pmqtest: Increase buffer to avoid overflow Date: Mon, 19 Aug 2019 08:43:01 +0200 Message-Id: <20190819064304.4676-2-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/pmqtest/pmqtest.c: In function ‘main’: src/pmqtest/pmqtest.c:46:21: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size 8 [-Wformat-overflow=] 46 | #define SYNCMQ_NAME "/syncmsg%d" | ^~~~~~~~~~~~ src/pmqtest/pmqtest.c:445:3: note: ‘sprintf’ output between 10 and 19 bytes into a destination of size 16 445 | sprintf(mqname, SYNCMQ_NAME, i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Daniel Wagner --- src/pmqtest/pmqtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.21.0 Signed-off-by: John Kacur diff --git a/src/pmqtest/pmqtest.c b/src/pmqtest/pmqtest.c index a04fc49872bf..3ce799bd6319 100644 --- a/src/pmqtest/pmqtest.c +++ b/src/pmqtest/pmqtest.c @@ -440,7 +440,7 @@ int main(int argc, char *argv[]) goto nomem; for (i = 0; i < num_threads; i++) { - char mqname[16]; + char mqname[19]; sprintf(mqname, SYNCMQ_NAME, i); receiver[i].syncmq = mq_open(mqname, oflag, 0777, &mqstat); @@ -567,7 +567,7 @@ int main(int argc, char *argv[]) } nanosleep(&maindelay, NULL); for (i = 0; i < num_threads; i++) { - char mqname[16]; + char mqname[19]; mq_close(receiver[i].syncmq); sprintf(mqname, SYNCMQ_NAME, i); 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); From patchwork Mon Aug 19 06:43:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 171582 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp2570234ily; Sun, 18 Aug 2019 23:43:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyG5d7pxiGWe4W+RR7FWUWNMzqit3rumh51MFMjPlEzStSZ2u+NYeFJlNjQyhHf0XNd1OF/ X-Received: by 2002:a63:2ec9:: with SMTP id u192mr18136414pgu.16.1566196993678; Sun, 18 Aug 2019 23:43:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566196993; cv=none; d=google.com; s=arc-20160816; b=Fr2wQO25fXFqHy4sxGwZb0YE9cmXsf7HcgeTAXPAHTIfkhW5Z2xT29IVST7MgmevZn YaJN6YahglZqQ2wbbzCKs84B/VaZTxqoItqOOorfINb5rJ0Nqqhf+WyDKpjI6iQ8EERO axNpTDN0Y6fl5fv6LTNa58AiiX9YIpWTOR0yzYUcoe1uR53VNDXTErlH/4iw+rrWbVPu nlA1KLh6VUXYM4G0uK051GSIQZnwhW8gY73kqwAxdo8pA8qgiD3R953SIACLg0Uo1xKP tbY4b/LKTt0pL1U3R9sNaBn1+gTszwouoT0sgh0ACh8VwyMH+BbGopNVE9K8MgJDt5PD Mayw== 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=B7P0diS01e9ZLRenaJ1QeUD0dYjOn5g+xMDDA2CF6Us=; b=QWhAHhDvwqbDTknAFgfg72EoG0/RAA4aotyAQF3ZKilEtQes6JctfccIWaJXpVRenD zfJdXimQ9zEVbO1dlrsjGuqx0qUn8WaVUALbo3TxmEgZz4uMAAn5IPuK6fxq3rzH8UAz QKSHyxZxReRHEP/XZSSZ2mFZ5+rcOQWPgnPrf3zJFniqDJVfJ/18PJQu+F7VJybZBOJ6 aQ1UTYZIaJkOvFzjeyo87b/CuqARcx2Oc81IeG8R4L4WQ3hUr0GT7wyzuWpEefLpKxOB JF/IGHKVUYo45qg9dA4pxGHwpcu6oGJCMZqFO2Amx1g+OaMYueXkEKcu3yNtWLluzGXR u70A== 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.13; Sun, 18 Aug 2019 23:43:13 -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 S1726767AbfHSGnM (ORCPT + 3 others); Mon, 19 Aug 2019 02:43:12 -0400 Received: from mail.monom.org ([188.138.9.77]:33096 "EHLO mail.monom.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725308AbfHSGnM (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 AD7E5500797; 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 93BED5007F3; 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 3/4] svsematest: Increase buffer to avoid overflow Date: Mon, 19 Aug 2019 08:43:03 +0200 Message-Id: <20190819064304.4676-4-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: rc/svsematest/svsematest.c:578:24: warning: ‘%d’ directive writing between 1 and 10 bytes into a region of size 5 [-Wformat-overflow=] 578 | sprintf(f_opt, "-fr%d", i); | ^~ src/svsematest/svsematest.c:606:5: note: ‘sprintf’ output between 5 and 14 bytes into a destination of size 8 606 | sprintf(f_opt, "-fs%d", i); | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Daniel Wagner --- src/svsematest/svsematest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.21.0 Signed-off-by: John Kacur diff --git a/src/svsematest/svsematest.c b/src/svsematest/svsematest.c index 8f880786ec0f..15e36af76288 100644 --- a/src/svsematest/svsematest.c +++ b/src/svsematest/svsematest.c @@ -401,7 +401,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; myfile = getenv("_"); From patchwork Mon Aug 19 06:43:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 171583 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp2570242ily; Sun, 18 Aug 2019 23:43:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcukizUq9v/xo+jizoP5wFHXlgxhU1L172TeTNG35tboe6zwbnvXiM+TPxRAN6R3fBgr9l X-Received: by 2002:a62:7e11:: with SMTP id z17mr21943355pfc.211.1566196994206; Sun, 18 Aug 2019 23:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566196994; cv=none; d=google.com; s=arc-20160816; b=CBvegergfZUtw3BuV8zCSiLIE4fP/725oDJ5WVo6yny5efYf1iSc98mTgZjys7EPrO iFaC2WWaxmOdhhc0C5UeSsLqpuo1yl/Zxhg9U0g6Y4FKhiidmjrZWYIkg+VKx55/Z/VW E7wiO9PnV8+mq/zQaRlLRf9ISwF9v10nMs12QOkSnKMbGnkwGvs9xhdpUSmtIR63ivJ9 e6oeIxjzw0VO4AIHvzbsXr7dUHR2Hd5CiksBvqQqMIg21BOHj1LNzHoshc2tBIXe6jyq Y6ElN1Eh0wGLAhln8eolEdAPIcsSGbHzRUEBQuDzLf2uMLg0g4BCMK8YJVnL4+yi7Cuu ntPw== 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=JhOYt1tFwnNbYqQA0ePoY1HjYywF652HdBvGQIrW3X0=; b=IFUE4UjM2HPc3b0pijYzVzXeqo7RTX7pT8IMpfJyhBAcJoiNzguc34EtX2N7BKdaYf nGhzqlVIteW7oJt/4hNR8Jkjq3Yhk0VOm/NAkylF04Fr8xMRRDK4yzxATFdHxAI7xF0T EEedlzlmali8l5Le9h6tRQyJweXUXaTy3lNAyRFlAYvNItbmrt6VLQ4vI0/o+Tj+iZOT MUYbnHzPYTF4e7uo3HTKVgOk5PQRYVxa5pqszPeTtDsahJ9GF7DXxukWOAUZhWBvDLTM sBhdnnFvtcDQFry5O6kmiUGK14PqRKzGitnspDZVdjYqNLNN/pRV+nVOp9jkwadKlBSk CbDw== 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.14; Sun, 18 Aug 2019 23:43:14 -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 S1726768AbfHSGnN (ORCPT + 3 others); Mon, 19 Aug 2019 02:43:13 -0400 Received: from mail.monom.org ([188.138.9.77]:33102 "EHLO mail.monom.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726751AbfHSGnM (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 3DA3B5007F3; Mon, 19 Aug 2019 08:43:11 +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 155CE5007D2; Mon, 19 Aug 2019 08:43:11 +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 4/4] deadline_test: Increase buffer to avoid overflow Date: Mon, 19 Aug 2019 08:43:04 +0200 Message-Id: <20190819064304.4676-5-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/sched_deadline/deadline_test.c:1803:24: warning: ‘%d’ directive writing between 1 and 11 bytes into a region of size 10 [-Wformat-overflow=] 1803 | sprintf(setcpu_buf, "%d", cpu_count - 1); | ^~ src/sched_deadline/deadline_test.c:1803:23: note: directive argument in the range [-2147483648, 2147483646] 1803 | sprintf(setcpu_buf, "%d", cpu_count - 1); | ^~~~ src/sched_deadline/deadline_test.c:1803:3: note: ‘sprintf’ output between 2 and 12 bytes into a destination of size 10 1803 | sprintf(setcpu_buf, "%d", cpu_count - 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Daniel Wagner --- src/sched_deadline/deadline_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.21.0 Signed-off-by: John Kacur diff --git a/src/sched_deadline/deadline_test.c b/src/sched_deadline/deadline_test.c index e2898de328bb..5b5f40dbb74d 100644 --- a/src/sched_deadline/deadline_test.c +++ b/src/sched_deadline/deadline_test.c @@ -1795,7 +1795,7 @@ int main (int argc, char **argv) /* -b has us bind to the last CPU. */ if (!all_cpus && !setcpu) { - setcpu_buf = malloc(10); + setcpu_buf = malloc(12); if (!setcpu_buf) { perror("malloc"); exit(-1);