# HG changeset patch # User Mychaela Falconia # Date 1716485397 0 # Node ID 6d9b10633f104d5f300defb60cb5bc21f4eb89ad # Parent 1d144553a5d0c6c3e1d255bd4d8019d78cb9ce0d etmsync Pirelli IMEI retrieval: fix poor use of printf() Bug reported by Vadim Yanitskiy : 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 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);