[vlc-devel] commit: Fix vasprintf warning. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Wed Aug 13 21:24:29 CEST 2008
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Aug 13 12:26:10 2008 -0700| [a021a7f95fc6a02eb74f00ef8adae93a84f3392c] | committer: Jean-Baptiste Kempf
Fix vasprintf warning.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a021a7f95fc6a02eb74f00ef8adae93a84f3392c
---
modules/access/ftp.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index 7d87456..c3cf705 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -589,10 +589,13 @@ static int ftp_SendCommand( vlc_object_t *p_access, access_sys_t *p_sys,
char *psz_cmd;
va_start( args, psz_fmt );
- vasprintf( &psz_cmd, psz_fmt, args );
+ if( vasprintf( &psz_cmd, psz_fmt, args ) == -1 )
+ return VLC_EGENERIC;
+
va_end( args );
msg_Dbg( p_access, "ftp_SendCommand:\"%s\"", psz_cmd);
+
if( net_Printf( VLC_OBJECT(p_access), p_sys->fd_cmd, NULL, "%s\r\n",
psz_cmd ) < 0 )
{
More information about the vlc-devel
mailing list