From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8160D1582EF for ; Wed, 12 Feb 2025 16:13:27 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 6B1B0343181 for ; Wed, 12 Feb 2025 16:13:27 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id AC92E110471; Wed, 12 Feb 2025 16:13:23 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id A4FD2110471 for ; Wed, 12 Feb 2025 16:13:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 51EE43430BB for ; Wed, 12 Feb 2025 16:13:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 95C7A279A for ; Wed, 12 Feb 2025 16:13:21 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1739375100.091ffea0fba395a2e090098ac142e29c0f1fbd9e.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/nast/files/, net-analyzer/nast/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-analyzer/nast/files/0001-Fix-signal-handler.patch net-analyzer/nast/files/0002-Fix-Wformat-security.patch net-analyzer/nast/nast-0.2.0-r3.ebuild net-analyzer/nast/nast-0.2.0-r4.ebuild X-VCS-Directories: net-analyzer/nast/ net-analyzer/nast/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 091ffea0fba395a2e090098ac142e29c0f1fbd9e X-VCS-Branch: master Date: Wed, 12 Feb 2025 16:13:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ac70060c-59ad-4372-ae77-15b64511e7b7 X-Archives-Hash: 762b7cf941e42d685116c631b21ed77f commit: 091ffea0fba395a2e090098ac142e29c0f1fbd9e Author: Sam James gentoo org> AuthorDate: Wed Feb 12 15:37:43 2025 +0000 Commit: Sam James gentoo org> CommitDate: Wed Feb 12 15:45:00 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=091ffea0 net-analyzer/nast: fix modern C issue, -Wformat-security Closes: https://bugs.gentoo.org/944402 Signed-off-by: Sam James gentoo.org> .../nast/files/0001-Fix-signal-handler.patch | 43 ++++++++++++++++ .../nast/files/0002-Fix-Wformat-security.patch | 58 ++++++++++++++++++++++ .../{nast-0.2.0-r3.ebuild => nast-0.2.0-r4.ebuild} | 4 +- 3 files changed, 104 insertions(+), 1 deletion(-) diff --git a/net-analyzer/nast/files/0001-Fix-signal-handler.patch b/net-analyzer/nast/files/0001-Fix-signal-handler.patch new file mode 100644 index 000000000000..7961649e7db6 --- /dev/null +++ b/net-analyzer/nast/files/0001-Fix-signal-handler.patch @@ -0,0 +1,43 @@ +From eff649cd681e52b953dcf37065a7035246930858 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Wed, 12 Feb 2025 15:32:37 +0000 +Subject: [PATCH 1/2] Fix signal handler + +Signal handlers need to take an argument. + +Bug: https://bugs.gentoo.org/944402 +Signed-off-by: Sam James +--- + common.c | 2 +- + include/nast.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/common.c b/common.c +index 5649295..f2b60f4 100644 +--- a/common.c ++++ b/common.c +@@ -226,7 +226,7 @@ void openfile(void) + } + + /* signal handler */ +-void sigexit() ++void sigexit(int unused) + { + #ifdef HAVE_LIBNCURSES + # include +diff --git a/include/nast.h b/include/nast.h +index f5cd047..a65a404 100644 +--- a/include/nast.h ++++ b/include/nast.h +@@ -73,7 +73,7 @@ int car (char *dev, int lg); + int run_bc (char *dev, char *filter); + + /* other functions*/ +-void sigexit(); ++void sigexit(int unused); + void openfile(void); + void bkg(void); + +-- +2.48.1 + diff --git a/net-analyzer/nast/files/0002-Fix-Wformat-security.patch b/net-analyzer/nast/files/0002-Fix-Wformat-security.patch new file mode 100644 index 000000000000..039950a6344e --- /dev/null +++ b/net-analyzer/nast/files/0002-Fix-Wformat-security.patch @@ -0,0 +1,58 @@ +From 63598f0194ec0b291af30d8d7b3ee7bab1cd0928 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Wed, 12 Feb 2025 15:35:13 +0000 +Subject: [PATCH 2/2] Fix -Wformat-security + +Signed-off-by: Sam James +--- + bcount.c | 2 +- + ncurses/n_nast.c | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/bcount.c b/bcount.c +index 3130188..7987ac6 100644 +--- a/bcount.c ++++ b/bcount.c +@@ -153,7 +153,7 @@ void bytecounting () + else icons++; + + sprintf (value, "%Ld", number); +- printf (value); ++ printf ("%s", value); + + /* calculate space */ + if (strlen(value) < 6) printf ("\t\t"); +diff --git a/ncurses/n_nast.c b/ncurses/n_nast.c +index 3e02859..ba50f2f 100644 +--- a/ncurses/n_nast.c ++++ b/ncurses/n_nast.c +@@ -641,7 +641,7 @@ void title(void) + title = subwin(stdscr,3,COLS,0,0); + wbkgd(title,COLOR_PAIR(1)); + box(title,0,0); +- mvwprintw(title,1,(COLS-sizeof(TITLE))/2, TITLE); ++ mvwprintw(title,1,(COLS-sizeof(TITLE))/2, "%s", TITLE); + wrefresh(title); + } + +@@ -748,7 +748,7 @@ void pop_up_win(void) + pop_up = newwin(17,55,(LINES-17)/2,(COLS-55)/2); + wbkgd(pop_up,COLOR_PAIR(4)); + box(pop_up,0,0); +- mvwprintw(pop_up,0,(55 -strlen(message))/2, message); ++ mvwprintw(pop_up,0,(55 -strlen(message))/2, "%s", message); + wrefresh(pop_up); + } + +@@ -759,7 +759,7 @@ void help_win(void) + help = newwin(23,67,(LINES-23)/2,(COLS-67)/2); + wbkgd(help,COLOR_PAIR(4)); + box(help,0,0); +- mvwprintw(help,0,(67 -strlen(message))/2, message); ++ mvwprintw(help,0,(67 -strlen(message))/2, "%s", message); + wrefresh(help); + } + +-- +2.48.1 + diff --git a/net-analyzer/nast/nast-0.2.0-r3.ebuild b/net-analyzer/nast/nast-0.2.0-r4.ebuild similarity index 86% rename from net-analyzer/nast/nast-0.2.0-r3.ebuild rename to net-analyzer/nast/nast-0.2.0-r4.ebuild index fa2602d1b025..7417306e5b69 100644 --- a/net-analyzer/nast/nast-0.2.0-r3.ebuild +++ b/net-analyzer/nast/nast-0.2.0-r4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -24,6 +24,8 @@ BDEPEND="virtual/pkgconfig" PATCHES=( "${FILESDIR}"/${P}-gentoo.patch + "${FILESDIR}"/0001-Fix-signal-handler.patch + "${FILESDIR}"/0002-Fix-Wformat-security.patch ) src_prepare() {