[vlc-devel] commit: Do the RIGHT check of asprintf. ( Rémi Duraffort )
git version control
git at videolan.org
Wed Aug 13 20:13:00 CEST 2008
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Aug 13 20:07:13 2008 +0200| [e422c3b53a44ea50bce20488b2011810dd09f4f2] | committer: Rémi Duraffort
Do the RIGHT check of asprintf.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e422c3b53a44ea50bce20488b2011810dd09f4f2
---
src/libvlc.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/libvlc.c b/src/libvlc.c
index 1820a4b..f982be8 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -909,8 +909,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
if( psz_codecs )
{
char *psz_morecodecs;
- asprintf(&psz_morecodecs, "%s,dmo,quicktime", psz_codecs);
- if( psz_morecodecs )
+ if( asprintf(&psz_morecodecs, "%s,dmo,quicktime", psz_codecs) != -1 )
{
config_PutPsz( p_libvlc, "codec", psz_morecodecs);
free( psz_morecodecs );
More information about the vlc-devel
mailing list