changeset 1011:6d9b10633f10 default tip

etmsync Pirelli IMEI retrieval: fix poor use of printf() 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.
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 23 May 2024 17:29:57 +0000
parents 1d144553a5d0
children
files rvinterf/etmsync/pirimei.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rvinterf/etmsync/pirimei.c	Tue Dec 12 07:45:56 2023 +0000
+++ 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);
+		fputs(failmsg, stderr);
 		return(ERROR_TARGET);
 	}
 	bcopy(decrypted[0], pirelli_imeisv, 8);