From c09619351209cfc6712eded5c53afbd5d02d4274 Mon Sep 17 00:00:00 2001 From: Ilja van Sprundel Date: Sun, 23 May 2021 21:10:49 +0000 Subject: [PATCH] webrtc: Avoid using dynamic strings as format strings Properly call format functions, dynamic strings shouldn't be passed as format strings. Instead a format string of "%s" should be used, with the dynamic string as it's argument. Part-of: --- src/modules/echo-cancel/webrtc.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/echo-cancel/webrtc.cc b/src/modules/echo-cancel/webrtc.cc index ec3ba06..56daab0 100644 --- a/src/modules/echo-cancel/webrtc.cc +++ b/src/modules/echo-cancel/webrtc.cc @@ -98,13 +98,13 @@ class PaWebrtcTraceCallback : public webrtc::TraceCallback { void Print(webrtc::TraceLevel level, const char *message, int length) { if (level & webrtc::kTraceError || level & webrtc::kTraceCritical) - pa_log(message); + pa_log("%s", message); else if (level & webrtc::kTraceWarning) - pa_log_warn(message); + pa_log_warn("%s", message); else if (level & webrtc::kTraceInfo) - pa_log_info(message); + pa_log_info("%s", message); else - pa_log_debug(message); + pa_log_debug("%s", message); } }; -- 2.7.4