summaryrefslogtreecommitdiff
path: root/sysutils/acpica-utils/patches/patch-source_compiler_aslwalks.c
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2018-10-27 21:44:53 +0000
committerabs <abs@pkgsrc.org>2018-10-27 21:44:53 +0000
commit2251ec6970cdfaa8502525d4cd4e8f1884201471 (patch)
treee36438ecf24dbd0c415d620833601c372639d842 /sysutils/acpica-utils/patches/patch-source_compiler_aslwalks.c
parentcdb7756a5ea1c8404eaa15733d5c1ce5ff32d761 (diff)
downloadpkgsrc-2251ec6970cdfaa8502525d4cd4e8f1884201471.tar.gz
Avoid some sprintf buffer overflows reported by gcc 8. Bump PKGREVISION
Diffstat (limited to 'sysutils/acpica-utils/patches/patch-source_compiler_aslwalks.c')
-rw-r--r--sysutils/acpica-utils/patches/patch-source_compiler_aslwalks.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sysutils/acpica-utils/patches/patch-source_compiler_aslwalks.c b/sysutils/acpica-utils/patches/patch-source_compiler_aslwalks.c
new file mode 100644
index 00000000000..736bbc980b5
--- /dev/null
+++ b/sysutils/acpica-utils/patches/patch-source_compiler_aslwalks.c
@@ -0,0 +1,15 @@
+$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,