summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy2024-05-24 00:59:16 +0700
committerVadim Yanitskiy2024-05-24 00:59:16 +0700
commita7196567265d4ddff72a4ccfd6934d96631ee60d (patch)
tree405b2d999cb9866a2f469cea10708ea45aa49886
parent5ed325732465be83f956869edb7d0352cfff98f2 (diff)
downloadaur-freecalypso-tools.tar.gz
fixup: apply the upstream fix for -Werror=format-security
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--rvinterf_werrorformat_security.patch23
3 files changed, 19 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index da03d4cd984a..fd161f00a06b 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = freecalypso-tools
pkgdesc = FreeCalypso host tools package
pkgver = r21
- pkgrel = 2
+ pkgrel = 3
url = https://www.freecalypso.org/hg/freecalypso-tools
arch = x86_64
arch = i686
@@ -11,6 +11,6 @@ pkgbase = freecalypso-tools
source = https://www.freecalypso.org/pub/GSM/FreeCalypso/fc-host-tools-r21.tar.bz2
source = rvinterf_werrorformat_security.patch
sha256sums = e038b3bdd30f60e7e1cf08837f29a0865463d4a80e5bec47054795fbac446862
- sha256sums = 79f9a4f1fecf56097f7bf49f67f7b07efb5f734ff17b938dfec10575e6cec046
+ sha256sums = 7d0141203308108b0e17727171fa3e2a1e8f309aeb083c2012c2bde75c85414b
pkgname = freecalypso-tools
diff --git a/PKGBUILD b/PKGBUILD
index 3f5653cd6455..bd8470225e13 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=freecalypso-tools
pkgver=r21
-pkgrel=2
+pkgrel=3
pkgdesc="FreeCalypso host tools package"
arch=('x86_64' 'i686')
url="https://www.freecalypso.org/hg/${pkgname}"
@@ -13,7 +13,7 @@ _tarname=fc-host-tools-${pkgver}
source=("https://www.freecalypso.org/pub/GSM/FreeCalypso/${_tarname}.tar.bz2"
'rvinterf_werrorformat_security.patch')
sha256sums=('e038b3bdd30f60e7e1cf08837f29a0865463d4a80e5bec47054795fbac446862'
- '79f9a4f1fecf56097f7bf49f67f7b07efb5f734ff17b938dfec10575e6cec046')
+ '7d0141203308108b0e17727171fa3e2a1e8f309aeb083c2012c2bde75c85414b')
prepare() {
cd "${_tarname}"
diff --git a/rvinterf_werrorformat_security.patch b/rvinterf_werrorformat_security.patch
index 998aa788ca63..ac4428b97493 100644
--- a/rvinterf_werrorformat_security.patch
+++ b/rvinterf_werrorformat_security.patch
@@ -1,20 +1,27 @@
# HG changeset patch
-# User Vadim Yanitskiy <fixeria@osmocom.org>
-# Date 1716481958 -25200
-# Thu May 23 23:32:38 2024 +0700
-# Node ID 1882f20bad701f1315834104e8d89e48da8e075b
+# User Mychaela Falconia <falcon@freecalypso.org>
+# Date 1716485397 0
+# Thu May 23 17:29:57 2024 +0000
+# Node ID 6d9b10633f104d5f300defb60cb5bc21f4eb89ad
# Parent 1d144553a5d0c6c3e1d255bd4d8019d78cb9ce0d
-rvinterf: fix -Werror=format-security in get_pirelli_imei()
+etmsync Pirelli IMEI retrieval: fix poor use of printf()
-diff -r 1d144553a5d0 -r 1882f20bad70 rvinterf/etmsync/pirimei.c
+Bug reported by Vadim Yanitskiy <fixeria@osmocom.org>: the construct
+where a static-allocated string was passed to printf() without any
+format arguments causes newer compilers to report a security problem.
+Given that formatted output is not needed here, just fixed string
+output, change printf() to fputs(), and direct the error message
+to stderr while at it.
+
+diff -r 1d144553a5d0 -r 6d9b10633f10 rvinterf/etmsync/pirimei.c
--- a/rvinterf/etmsync/pirimei.c Tue Dec 12 07:45:56 2023 +0000
-+++ b/rvinterf/etmsync/pirimei.c Thu May 23 23:32:38 2024 +0700
++++ b/rvinterf/etmsync/pirimei.c Thu May 23 17:29:57 2024 +0000
@@ -30,7 +30,7 @@
cl_des(ciphertext[0], dieid_key, decrypted[0], CL_DES_DECRYPTION);
cl_des(ciphertext[1], dieid_key, decrypted[1], CL_DES_DECRYPTION);
if (bcmp(decrypted[1], dieid_key, 8)) {
- printf(failmsg);
-+ puts(failmsg);
++ fputs(failmsg, stderr);
return(ERROR_TARGET);
}
bcopy(decrypted[0], pirelli_imeisv, 8);