[PATCH] osmo-iuh[master]: hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out()

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Dec 26 20:44:25 UTC 2017


Review at  https://gerrit.osmocom.org/5593

hnbgw_vty.c: Fix "-Werror=format-security" failure in vty_out()

We have to use a format string, we cannot directly print "name".

Fixes a build error on our OBS builds:
hnbgw_vty.c:156:5: error: format not a string literal and no format arguments [-Werror=format-security]
which was introduced in Change-Id I3c937306a011715e163a40bc8ef8ec7e8d4e5d08
about one week ago.

Change-Id: I042989c2b7b379284b2ee5fea3bd8f8ce406b09e
---
M src/hnbgw_vty.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/93/5593/1

diff --git a/src/hnbgw_vty.c b/src/hnbgw_vty.c
index 2c47bba..859cd31 100644
--- a/src/hnbgw_vty.c
+++ b/src/hnbgw_vty.c
@@ -153,7 +153,7 @@
 	    vty_out(vty, "(no addr)");
 	    return;
 	}
-	vty_out(vty, name);
+	vty_out(vty, "%s", name);
 	talloc_free(name);
 }
 

-- 
To view, visit https://gerrit.osmocom.org/5593
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I042989c2b7b379284b2ee5fea3bd8f8ce406b09e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list