[MPlayer-cvslog] r36740 - in trunk: gui/interface.c stream/stream_radio.c

al subversion at mplayerhq.hu
Sun Jan 26 05:14:24 CET 2014


Author: al
Date: Sun Jan 26 05:14:23 2014
New Revision: 36740

Log:
Do not use non-literal arguments for mp_msg format string

Make the code easier to review and more robust against
future changes.

Fix ticket #2173

Modified:
   trunk/gui/interface.c
   trunk/stream/stream_radio.c

Modified: trunk/gui/interface.c
==============================================================================
--- trunk/gui/interface.c	Sat Jan 25 17:55:12 2014	(r36739)
+++ trunk/gui/interface.c	Sun Jan 26 05:14:23 2014	(r36740)
@@ -1183,7 +1183,7 @@ void gmp_msg(int mod, int lev, const cha
     vsnprintf(msg, sizeof(msg), format, va);
     va_end(va);
 
-    mp_msg(mod, lev, msg);
+    mp_msg(mod, lev, "%s", msg);
 
     if (mp_msg_test(mod, lev))
         gtkMessageBox(MSGBOX_FATAL, msg);

Modified: trunk/stream/stream_radio.c
==============================================================================
--- trunk/stream/stream_radio.c	Sat Jan 25 17:55:12 2014	(r36739)
+++ trunk/stream/stream_radio.c	Sun Jan 26 05:14:23 2014	(r36740)
@@ -1138,7 +1138,7 @@ static int open_s(stream_t *stream,int m
     mp_msg(MSGT_RADIO,MSGL_V,"\n");
 
     if(priv->driver)
-        mp_msg(MSGT_RADIO, MSGL_INFO, priv->driver->info);
+        mp_msg(MSGT_RADIO, MSGL_INFO, "%s", priv->driver->info);
     else{
         mp_msg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_DriverUnknownStr,priv->radio_param->driver);
         close_s(stream);


More information about the MPlayer-cvslog mailing list