summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Beierlein <tomjbe@gentoo.org>2020-03-25 15:14:44 +0100
committerThomas Beierlein <tomjbe@gentoo.org>2020-03-25 15:15:10 +0100
commitc206ece2b4cc4b081a32850bb50af6c5ec3d73bd (patch)
treebe278e7087750d91c381c7f16924581f2dce70be /media-libs/hamlib
parentmedia-libs/hamlib: Drop old (diff)
downloadgentoo-c206ece2b4cc4b081a32850bb50af6c5ec3d73bd.tar.gz
gentoo-c206ece2b4cc4b081a32850bb50af6c5ec3d73bd.tar.bz2
gentoo-c206ece2b4cc4b081a32850bb50af6c5ec3d73bd.zip
media-libs/hamlib: Fix build error with -Werror=format-security
Closes: https://bugs.gentoo.org/714682 Package-Manager: Portage-2.3.94, Repoman-2.3.21 Signed-off-by: Thomas Beierlein <tomjbe@gentoo.org>
Diffstat (limited to 'media-libs/hamlib')
-rw-r--r--media-libs/hamlib/files/hamlib-3.3-format-security.patch14
-rw-r--r--media-libs/hamlib/hamlib-3.3.ebuild4
2 files changed, 18 insertions, 0 deletions
diff --git a/media-libs/hamlib/files/hamlib-3.3-format-security.patch b/media-libs/hamlib/files/hamlib-3.3-format-security.patch
new file mode 100644
index 000000000000..bbf2de1d17d5
--- /dev/null
+++ b/media-libs/hamlib/files/hamlib-3.3-format-security.patch
@@ -0,0 +1,14 @@
+# Fixes build error with format-securety (bug #714682)
+diff --git a/tests/rotctl_parse.c b/tests/rotctl_parse.c
+index 44308cc..aab1300 100644
+--- a/tests/rotctl_parse.c
++++ b/tests/rotctl_parse.c
+@@ -1009,7 +1009,7 @@ int rotctl_parse(ROT *my_rot, FILE *fin, FILE *fout, char *argv[], int argc)
+ /* The starting position of the source string is the first
+ * character past the initial '\'.
+ */
+- snprintf(cmd_name, sizeof(cmd_name), parsed_input[0] + 1);
++ snprintf(cmd_name, sizeof(cmd_name), "%s", parsed_input[0] + 1);
+
+ /* Sanity check as valid multiple character commands consist of
+ * alpha-numeric characters and the underscore ('_') character.
diff --git a/media-libs/hamlib/hamlib-3.3.ebuild b/media-libs/hamlib/hamlib-3.3.ebuild
index 7a23ca37f1be..2cde4b103be4 100644
--- a/media-libs/hamlib/hamlib-3.3.ebuild
+++ b/media-libs/hamlib/hamlib-3.3.ebuild
@@ -34,6 +34,8 @@ DEPEND=" ${RDEPEND}
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+PATCHES=( "${FILESDIR}"/hamlib-3.3-format-security.patch )
+
DOCS=(AUTHORS NEWS PLAN README README.betatester README.developer TODO)
pkg_setup() {
@@ -57,6 +59,8 @@ src_prepare() {
eautoreconf
+ eapply "${PATCHES}"
+
eapply_user
}