Change in osmo-pcu[master]: encoding: fix log_alert_exit(): do not treat error as format string

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Fri Jan 24 22:26:46 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/17008 )


Change subject: encoding: fix log_alert_exit(): do not treat error as format string
......................................................................

encoding: fix log_alert_exit(): do not treat error as format string

This is rather a cosmetic change aimed to make ASAN / Coverity happy.
In general, we never pass any input from an untrusted source.

Change-Id: I26d654da4c3bf5fd86a298c3027fd9820c932308
---
M src/encoding.cpp
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/08/17008/1

diff --git a/src/encoding.cpp b/src/encoding.cpp
index 8c3aaed..23b35bd 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -432,7 +432,7 @@
 
 static inline void log_alert_exit(const char * error)
 {
-	LOGP(DRLCMACUL, LOGL_ERROR, error);
+	LOGP(DRLCMACUL, LOGL_ERROR, "%s", error);
 	pcu_tx_txt_ind(PCU_OML_ALERT, error);
 	exit(1);
 }

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/17008
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I26d654da4c3bf5fd86a298c3027fd9820c932308
Gerrit-Change-Number: 17008
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200124/d9e8a002/attachment.htm>


More information about the gerrit-log mailing list