From patchwork Fri Aug 16 06:42: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: 171462 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp448280ily; Thu, 15 Aug 2019 23:42:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmQ6+8v2duIES6TRuBSOIS0JZjgbZ2uhFZSCBvgxFNRV4LIA/Gzk61OBv4EeaJctE0jQ4O X-Received: by 2002:a63:f91c:: with SMTP id h28mr6116707pgi.397.1565937743271; Thu, 15 Aug 2019 23:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565937743; cv=none; d=google.com; s=arc-20160816; b=OkTQ2UPz10iKl66FhQPB4+Op2Ul9eUnx433n2xwhmjBlYfeaUSN35qjGeVhPRWGliT C10IeuGy1B2NvEyZ9GxZmMcNboUwDOGos8No33tNBNqhf/f8IgoPMewCzf7ouQafnNFN 2AtI3GozTT/Whye9u/WwW7+hYB+h36xZcX3we/lykpCWRT09uz15SBhKa7b7xDEId/2V QXWvUSigKnMz4XDodeYD8Nl3CLycBNzkrXcyTqQw03Zkux/8af+UEWlRCeW7kmgTAwJY uEpwRzklaWgfYkFagVI83hD4pAWZz5yW9ZVN5QK6Xr5VLNSahCJ5B+b5nDPsbG2gkpmz UEsQ== 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=tVhVpy1lZNb8KH8z8inPySGXYnMfRsjspWEyVyArKhU=; b=Vez6SgqDLLioNYMg0U7bwRZvoECyT76Ee2kV4/YRg0jTUXlQcuQS4UTCyg7lGucUY1 +brFw+KJNp+FKrfRgWRFxLkgB9k+LogtdpPaCXa4BT2RoFyoh/R0/dzjDpXPtcV+9u77 gdiHWntjv+5uF5inTsqyD7BIXE0nVhOOmk9TPEnjUtOonNz0vBifxadcrFo7PHkBMX6x c3irtoR2RUpx42xHRUorxkSjTsTfSJ4gupICidRUvSrbPbLwCpyeoFonDjQbAfPJ1Wnr z+IiubPmw9Fji1EuqV7+ZGxy5meehSxyrVZXsBNQ0oGU7ALW3w9ecFlBI2/6cDvhCPKZ IC2Q== 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:23 -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 S1726816AbfHPGmW (ORCPT + 3 others); Fri, 16 Aug 2019 02:42:22 -0400 Received: from mail.monom.org ([188.138.9.77]:52468 "EHLO mail.monom.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbfHPGmW (ORCPT ); Fri, 16 Aug 2019 02:42:22 -0400 Received: from mail.monom.org (localhost [127.0.0.1]) by filter.mynetwork.local (Postfix) with ESMTP id 9F9DB5006D2; Fri, 16 Aug 2019 08:42:20 +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 79A34500665; 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 1/4] pmqtest: Increase buffer to avoid overflow Date: Fri, 16 Aug 2019 08:42:01 +0200 Message-Id: <20190816064204.6339-2-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/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 diff --git a/src/pmqtest/pmqtest.c b/src/pmqtest/pmqtest.c index a04fc49872bf..20164c8d547f 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[32]; 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[32]; mq_close(receiver[i].syncmq); sprintf(mqname, SYNCMQ_NAME, i); 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); From patchwork Fri Aug 16 06:42: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: 171464 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp448301ily; Thu, 15 Aug 2019 23:42:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqzNdBjJgnKNIrl8NFWwyAhW0YVURc+tpRCxpW9eeqt26l+zEr2P97Up5EBsOb4W+PFW0/rh X-Received: by 2002:a17:902:a409:: with SMTP id p9mr7883593plq.218.1565937744653; 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=Zjl5ySuqD73Zz9H3Z9k83lW6YN4+OQa5jlG8U4IoTpfKqbYkPpZEbTsCZrDh+666X5 wPI9G2l71SM0CtrnB8SQ7neukgrsoZ8yNpGqqVMiK2qREYfXX4sEVlu4ZQj6/3ASIH9p h1Lsk3veVsVJdCVPsY43XnNHC8xurctqioZft2Yy8C3Q07K2zWUlnB+L4YMak2DJ9fL5 E5HcFh7c6Xedi7IRa8QnulOXkOXq7j6OAFJHVFawOSmHNZKmP2QslVk0BOA1F5jE7LLz ZC9huTMBxPmNzPX43nK+zdteJ2WgtDRuFj4e2y3hzIEUoUrAZM2Jqm4AzeMaJTOueI8o RzUA== 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=55g6AkonxONrxLh/0/emlM4KWt0+V3Rw6Qd5NMKb9G8=; b=ImfAS7Y0MMoTMfnLTgUgIuzYO1zMrLX7V/pMqCUrRxJj0lrBfvh8tiWD+BXJGNLaR5 mF1tmJd89DW9qX7GG7gqVsJxfaGWPX8TnIjmVgo4kiaYiXWq6vn8D01vxrmCBl702uTa 1sFDEfMfSRCmVAFuiDcGVwW7Hhwez/cGE2R4vndXqqCSyaa81FdzmKovuu52WRhHi8qL d3Rh93/qu2lIsxdfg2NUqD1U1L59Tt1Pa1JVGo61GWsYooRcqqxXLpgnNKjbV049Br95 PKQpZ60pn6konGWIggdT6zebyvkG8NfSxobTYNcZb+pegkDd+cPDwFLaYR+40JhbYqSB 1M7g== 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.24; 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 S1726898AbfHPGmY (ORCPT + 3 others); Fri, 16 Aug 2019 02:42:24 -0400 Received: from mail.monom.org ([188.138.9.77]:52488 "EHLO mail.monom.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725945AbfHPGmX (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 D72E05009CB; 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 8C5D9500697; Fri, 16 Aug 2019 08:42:21 +0200 (CEST) From: Daniel Wagner To: Clark Williams , John Kacur Cc: linux-rt-users@vger.kernel.org, Daniel Wagner Subject: [PATCH rt-tests v0 3/4] svsematest: Increase buffer to avoid overflow Date: Fri, 16 Aug 2019 08:42:03 +0200 Message-Id: <20190816064204.6339-4-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: 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 diff --git a/src/svsematest/svsematest.c b/src/svsematest/svsematest.c index 8f880786ec0f..ea9da2b8e593 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[32]; struct timespec launchdelay, maindelay; myfile = getenv("_"); From patchwork Fri Aug 16 06:42: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: 171465 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp448310ily; Thu, 15 Aug 2019 23:42:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqwf2Pk70jwoYCKSWU0l0vZX2grUUu7/xEYIWpcriqZAlVNa3NuCRkaiGmuGyZRAq8KXaQRh X-Received: by 2002:a17:90a:30ad:: with SMTP id h42mr5649611pjb.31.1565937745606; Thu, 15 Aug 2019 23:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565937745; cv=none; d=google.com; s=arc-20160816; b=A7/dPZmtHRlfS7VDfCl4VC29nKC4KjK+Lvsuh0Qe0ZTNjmFcSvXewQ4K0OD8TjmAmL i+wYPXSlRWma2qucL549dUEVbX69fH4kmLRV5eNQzNOczXPZGIDw+9pgVJXIRd3ferYV plXEslNRq6lc35RQUWTLDGxKdiCgbhmXIMWALmhCYIqAczUUrz1IEiyJwX8wgffOWfdl wwqEJoWF9GGz/KsyH0tsIboTXBP2ib5ajXMocoaxFJod/6FlFAx1INs6RafBWQIbFY7q EoeA7eseWy4r6a+ScD12ca9cRcbIhgJj6fN4B25f26DcxXcwSTvnG8bt+SKoBOp1/7Ra BTxw== 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=v4DlGD/FwIdqhcGMmDiXbD30rJNa9YaB49IuxE1/KKxQOR5hNmI/Vv0KJA9H4+3Jtc M7IRtTku/OiHhOlyIZeIeKKvfGABoFqeddopnPmh2o+LgzeM1viuTKPquovDbjInSW+E WbsIIHzxE7cl5FAKGCtkonVVxon99QXzxMRI8DpdTx3pf+tziGuVwJkeqRtro5ZPbVG6 kEbwJq3SbL3v9rl5oU7cdj0EIg+pnTiUH8pVvDKgzKnj+vPwRZYzSb9UoZcMiuEehpe4 /Cvfocbv7fDxZyVw4GApPNwgK+Oti1+ctyqUEA4kBTc8MIKBw9y61v86+ib049SD2SO3 E6GQ== 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.25; Thu, 15 Aug 2019 23:42:25 -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 S1726910AbfHPGmY (ORCPT + 3 others); Fri, 16 Aug 2019 02:42:24 -0400 Received: from mail.monom.org ([188.138.9.77]:52498 "EHLO mail.monom.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726841AbfHPGmX (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 73CF25009BC; Fri, 16 Aug 2019 08:42:22 +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 28A1950093C; Fri, 16 Aug 2019 08:42:22 +0200 (CEST) From: Daniel Wagner To: Clark Williams , John Kacur Cc: linux-rt-users@vger.kernel.org, Daniel Wagner Subject: [PATCH rt-tests v0 4/4] deadline_test: Increase buffer to avoid overflow Date: Fri, 16 Aug 2019 08:42:04 +0200 Message-Id: <20190816064204.6339-5-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/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 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);