[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] webrtc: Avoid using dynamic strings as format strings

PulseAudio Marge Bot (@pulseaudio-merge-bot) gitlab at gitlab.freedesktop.org
Thu Jun 3 18:34:21 UTC 2021



PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio


Commits:
c0961935 by Ilja van Sprundel at 2021-06-03T21:26:25+03:00
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: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/563>

- - - - -


1 changed file:

- src/modules/echo-cancel/webrtc.cc


Changes:

=====================================
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);
     }
 };
 



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/c09619351209cfc6712eded5c53afbd5d02d4274

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/c09619351209cfc6712eded5c53afbd5d02d4274
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20210603/8a70bafa/attachment.htm>


More information about the pulseaudio-commits mailing list