Sat Oct 27 21:44:53 2018 UTC ()
Avoid some sprintf buffer overflows reported by gcc 8. Bump PKGREVISION
(abs)
diff -r1.10 -r1.11 pkgsrc/sysutils/acpica-utils/Makefile
diff -r1.13 -r1.14 pkgsrc/sysutils/acpica-utils/distinfo
diff -r0 -r1.1 pkgsrc/sysutils/acpica-utils/patches/patch-source_compiler_aslanalyze.c
diff -r0 -r1.1 pkgsrc/sysutils/acpica-utils/patches/patch-source_compiler_aslpredef.c
diff -r0 -r1.1 pkgsrc/sysutils/acpica-utils/patches/patch-source_compiler_aslwalks.c
diff -r1.1 -r1.2 pkgsrc/sysutils/acpica-utils/patches/patch-source_include_platform_acnetbsd.h
--- pkgsrc/sysutils/acpica-utils/Makefile 2016/10/14 10:31:12 1.10
+++ pkgsrc/sysutils/acpica-utils/Makefile 2018/10/27 21:44:53 1.11
| @@ -1,18 +1,19 @@ | | | @@ -1,18 +1,19 @@ |
1 | # $NetBSD: Makefile,v 1.10 2016/10/14 10:31:12 maya Exp $ | | 1 | # $NetBSD: Makefile,v 1.11 2018/10/27 21:44:53 abs Exp $ |
2 | # | | 2 | # |
3 | | | 3 | |
4 | DISTNAME= acpica-unix2-20160930 | | 4 | DISTNAME= acpica-unix2-20160930 |
5 | PKGNAME= ${DISTNAME:S/-unix2-/-utils-/} | | 5 | PKGNAME= ${DISTNAME:S/-unix2-/-utils-/} |
| | | 6 | PKGREVISION= 1 |
6 | CATEGORIES= sysutils devel | | 7 | CATEGORIES= sysutils devel |
7 | MASTER_SITES= https://acpica.org/sites/acpica/files/ | | 8 | MASTER_SITES= https://acpica.org/sites/acpica/files/ |
8 | | | 9 | |
9 | MAINTAINER= pkgsrc-users@NetBSD.org | | 10 | MAINTAINER= pkgsrc-users@NetBSD.org |
10 | HOMEPAGE= http://www.acpica.org/ | | 11 | HOMEPAGE= http://www.acpica.org/ |
11 | COMMENT= Intel ACPI CA Unix utilities | | 12 | COMMENT= Intel ACPI CA Unix utilities |
12 | LICENSE= modified-bsd OR gnu-gpl-v2 | | 13 | LICENSE= modified-bsd OR gnu-gpl-v2 |
13 | | | 14 | |
14 | TESTS_DISTNAME= ${DISTNAME:S/acpica-unix2-/acpitests-unix-/} | | 15 | TESTS_DISTNAME= ${DISTNAME:S/acpica-unix2-/acpitests-unix-/} |
15 | DISTFILES= ${DEFAULT_DISTFILES} | | 16 | DISTFILES= ${DEFAULT_DISTFILES} |
16 | DISTFILES+= ${TESTS_DISTNAME}${EXTRACT_SUFX} | | 17 | DISTFILES+= ${TESTS_DISTNAME}${EXTRACT_SUFX} |
17 | | | 18 | |
18 | USE_TOOLS+= bison flex gm4 gmake bash | | 19 | USE_TOOLS+= bison flex gm4 gmake bash |
| @@ -41,14 +42,20 @@ do-test: | | | @@ -41,14 +42,20 @@ do-test: |
41 | # ACPICA Tests rely on non-zero exit | | 42 | # ACPICA Tests rely on non-zero exit |
42 | ## ASL tests | | 43 | ## ASL tests |
43 | cd ${WRKSRC}/tests && ./aslts.sh -u | | 44 | cd ${WRKSRC}/tests && ./aslts.sh -u |
44 | ## API tests | | 45 | ## API tests |
45 | cd ${WRKSRC}/tests/aapits && gmake | | 46 | cd ${WRKSRC}/tests/aapits && gmake |
46 | cd ${WRKSRC}/tests/aapits/asl && \ | | 47 | cd ${WRKSRC}/tests/aapits/asl && \ |
47 | ASL=${WRKSRC}/generate/unix/bin/iasl gmake | | 48 | ASL=${WRKSRC}/generate/unix/bin/iasl gmake |
48 | # This one needs to be fixed | | 49 | # This one needs to be fixed |
49 | # cd ${WRKSRC}/tests/aapits/bin && ./aapitsrun | | 50 | # cd ${WRKSRC}/tests/aapits/bin && ./aapitsrun |
50 | ## Template tests | | 51 | ## Template tests |
51 | # This test is broken too | | 52 | # This test is broken too |
52 | # cd ${WRKSRC}/tests/templates && gmake | | 53 | # cd ${WRKSRC}/tests/templates && gmake |
53 | | | 54 | |
| | | 55 | .include "../../mk/compiler.mk" |
| | | 56 | |
| | | 57 | .if !empty(CC_VERSION:Mgcc-8*) |
| | | 58 | CFLAGS+= -Wno-error=format-truncation |
| | | 59 | .endif |
| | | 60 | |
54 | .include "../../mk/bsd.pkg.mk" | | 61 | .include "../../mk/bsd.pkg.mk" |
--- pkgsrc/sysutils/acpica-utils/distinfo 2018/09/17 13:11:59 1.13
+++ pkgsrc/sysutils/acpica-utils/distinfo 2018/10/27 21:44:53 1.14
| @@ -1,13 +1,16 @@ | | | @@ -1,13 +1,16 @@ |
1 | $NetBSD: distinfo,v 1.13 2018/09/17 13:11:59 maya Exp $ | | 1 | $NetBSD: distinfo,v 1.14 2018/10/27 21:44:53 abs Exp $ |
2 | | | 2 | |
3 | SHA1 (acpica-unix2-20160930.tar.gz) = 45b1d14454b8986ed56ec81c217694131becbcbf | | 3 | SHA1 (acpica-unix2-20160930.tar.gz) = 45b1d14454b8986ed56ec81c217694131becbcbf |
4 | RMD160 (acpica-unix2-20160930.tar.gz) = f58d5cbfe516340f168b8e2090c656097c7964cd | | 4 | RMD160 (acpica-unix2-20160930.tar.gz) = f58d5cbfe516340f168b8e2090c656097c7964cd |
5 | SHA512 (acpica-unix2-20160930.tar.gz) = 9d3eb7ece52bd62ff5784f7173b7ad5d1140bcb56c8ed4256d7293b0f6d296c5ad600636c26f6fbc0989440839b2e986ae387c65389451538779748d1d932b1a | | 5 | SHA512 (acpica-unix2-20160930.tar.gz) = 9d3eb7ece52bd62ff5784f7173b7ad5d1140bcb56c8ed4256d7293b0f6d296c5ad600636c26f6fbc0989440839b2e986ae387c65389451538779748d1d932b1a |
6 | Size (acpica-unix2-20160930.tar.gz) = 1424425 bytes | | 6 | Size (acpica-unix2-20160930.tar.gz) = 1424425 bytes |
7 | SHA1 (acpitests-unix-20160930.tar.gz) = 395c3c2103cbf80a5f73ff9cde16d6e1096e4a5d | | 7 | SHA1 (acpitests-unix-20160930.tar.gz) = 395c3c2103cbf80a5f73ff9cde16d6e1096e4a5d |
8 | RMD160 (acpitests-unix-20160930.tar.gz) = f9d3e152191c2595301e2356441fca8630c36b0e | | 8 | RMD160 (acpitests-unix-20160930.tar.gz) = f9d3e152191c2595301e2356441fca8630c36b0e |
9 | SHA512 (acpitests-unix-20160930.tar.gz) = f982826e01de7a79da543c2ca99dfc9459829a03332841dfe00f45bfc1620bdfa986a5ce4c8bbee2933325c1c526434c04e3601d727fb111f049e71e080a4c71 | | 9 | SHA512 (acpitests-unix-20160930.tar.gz) = f982826e01de7a79da543c2ca99dfc9459829a03332841dfe00f45bfc1620bdfa986a5ce4c8bbee2933325c1c526434c04e3601d727fb111f049e71e080a4c71 |
10 | Size (acpitests-unix-20160930.tar.gz) = 1829886 bytes | | 10 | Size (acpitests-unix-20160930.tar.gz) = 1829886 bytes |
11 | SHA1 (patch-generate_unix_Makefile.config) = b760ec07afa96902641ff4b979b7764baa39aceb | | 11 | SHA1 (patch-generate_unix_Makefile.config) = b760ec07afa96902641ff4b979b7764baa39aceb |
12 | SHA1 (patch-source_include_platform_acnetbsd.h) = d272a3c84d337c2da44d83b37efb81f83a213a39 | | 12 | SHA1 (patch-source_compiler_aslanalyze.c) = fae01580943d61dd907bd2835be432258f972f7d |
| | | 13 | SHA1 (patch-source_compiler_aslpredef.c) = 1d4c9a5fe0ad437f55b0381761ed128624fc220d |
| | | 14 | SHA1 (patch-source_compiler_aslwalks.c) = 7c18ed4005c383020f94c71a2fc5ee2f768fcb07 |
| | | 15 | SHA1 (patch-source_include_platform_acnetbsd.h) = 004db064e8ff8c2bc5314d6d506e9da8d281376d |
13 | SHA1 (patch-source_include_platform_acsolaris.h) = ecc090345a6d259f96923376e65d28c57dceebab | | 16 | SHA1 (patch-source_include_platform_acsolaris.h) = ecc090345a6d259f96923376e65d28c57dceebab |
$NetBSD: patch-source_compiler_aslanalyze.c,v 1.1 2018/10/27 21:44:53 abs Exp $
Avoid potential sprintf buffer overflow reported by gcc 8.2.0
--- source/compiler/aslanalyze.c.orig 2016-09-30 16:43:56.000000000 +0000
+++ source/compiler/aslanalyze.c
@@ -355,7 +355,7 @@ AnCheckMethodReturnValue (
*/
if (ThisNodeBtype != 0)
{
- sprintf (MsgBuffer,
+ snprintf (MsgBuffer, sizeof(MsgBuffer),
"Method returns [%s], %s operator requires [%s]",
StringBuffer, OpInfo->Name, StringBuffer2);
$NetBSD: patch-source_compiler_aslpredef.c,v 1.1 2018/10/27 21:44:53 abs Exp $
Avoid potential sprintf buffer overflow reported by gcc 8.2.0
--- source/compiler/aslpredef.c.orig 2016-09-30 16:43:57.000000000 +0000
+++ source/compiler/aslpredef.c
@@ -162,7 +162,7 @@ ApCheckForPredefinedMethod (
AcpiUtGetExpectedReturnTypes (StringBuffer,
ThisName->Info.ExpectedBtypes);
- sprintf (MsgBuffer, "%s required for %4.4s",
+ snprintf (MsgBuffer, sizeof(MsgBuffer), "%s required for %4.4s",
StringBuffer, ThisName->Info.Name);
AslError (ASL_WARNING, ASL_MSG_RESERVED_RETURN_VALUE, Op,
@@ -700,12 +700,12 @@ TypeErrorExit:
if (PackageIndex == ACPI_NOT_PACKAGE_ELEMENT)
{
- sprintf (MsgBuffer, "%4.4s: found %s, %s required",
+ snprintf (MsgBuffer, sizeof(MsgBuffer), "%4.4s: found %s, %s required",
PredefinedName, TypeName, StringBuffer);
}
else
{
- sprintf (MsgBuffer, "%4.4s: found %s at index %u, %s required",
+ snprintf (MsgBuffer, sizeof(MsgBuffer), "%4.4s: found %s at index %u, %s required",
PredefinedName, TypeName, PackageIndex, StringBuffer);
}
$NetBSD: patch-source_compiler_aslwalks.c,v 1.1 2018/10/27 21:44:53 abs Exp $
Avoid potential sprintf buffer overflow reported by gcc 8.2.0
--- source/compiler/aslwalks.c.orig 2016-09-30 16:43:57.000000000 +0000
+++ source/compiler/aslwalks.c
@@ -511,7 +511,7 @@ AnOperandTypecheckWalkEnd (
AnFormatBtype (StringBuffer, ThisNodeBtype);
AnFormatBtype (StringBuffer2, RequiredBtypes);
- sprintf (MsgBuffer, "[%s] found, %s operator requires [%s]",
+ snprintf (MsgBuffer, sizeof(MsgBuffer), "[%s] found, %s operator requires [%s]",
StringBuffer, OpInfo->Name, StringBuffer2);
AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE,
--- pkgsrc/sysutils/acpica-utils/patches/patch-source_include_platform_acnetbsd.h 2018/09/17 13:11:59 1.1
+++ pkgsrc/sysutils/acpica-utils/patches/patch-source_include_platform_acnetbsd.h 2018/10/27 21:44:53 1.2