[vlc-devel] commit: Revert "services_discovery: fix embedding translated longname into name" ( Rémi Denis-Courmont )

git version control git at videolan.org
Tue Feb 9 20:46:40 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Feb  9 21:42:26 2010 +0200| [bb14295facd013c7606b3dd912c5ad1868bd5dcf] | committer: Rémi Denis-Courmont 

Revert "services_discovery: fix embedding translated longname into name"

This fixes a buffer overflow and a warning.
This reverts commit caa08dce07c3b08677645263e325b33148f536bd.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=bb14295facd013c7606b3dd912c5ad1868bd5dcf
---

 include/vlc_services_discovery.h |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/include/vlc_services_discovery.h b/include/vlc_services_discovery.h
index 0efed92..06026c7 100644
--- a/include/vlc_services_discovery.h
+++ b/include/vlc_services_discovery.h
@@ -101,11 +101,8 @@ VLC_EXPORT(int, vlc_sd_probe_Add, (vlc_probe_t *, const char *, const char *));
 #define VLC_SD_PROBE_HELPER(name, longname) \
 static int vlc_sd_probe_Open (vlc_object_t *obj) \
 { \
-    char *psz_longname = longname; \
-    char psz_name[ strlen( psz_longname ) + 20 ]; \
-    sprintf( psz_name, name "{longname=\"%s\"}", psz_longname ); \
     return vlc_sd_probe_Add ((struct vlc_probe_t *)obj, \
-                             psz_name, longname); \
+                             name "{longname=\"" # longname "\"}", longname); \
 }
 
 /** @} */




More information about the vlc-devel mailing list