[vlc-commits] commit: Grow: fix crash when the password is NULL. ( Rémi Duraffort )

git at videolan.org git at videolan.org
Sun Mar 28 19:11:03 CEST 2010


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Mar 28 18:22:34 2010 +0200| [5ef889a45334e524519e976d7a7ff80679b614f8] | committer: Rémi Duraffort 

Grow: fix crash when the password is NULL.

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

 modules/misc/notify/growl_udp.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules/misc/notify/growl_udp.c b/modules/misc/notify/growl_udp.c
index 72764be..234a3d7 100644
--- a/modules/misc/notify/growl_udp.c
+++ b/modules/misc/notify/growl_udp.c
@@ -255,6 +255,14 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset )
     char *psz_password = var_InheritString( p_this, "growl-password" );
     char *psz_server = var_InheritString( p_this, "growl-server" );
     int i_port = var_InheritInteger( p_this, "growl-port" );
+
+    if(!psz_password || !psz_server)
+    {
+        free( psz_password );
+        free( psz_server );
+        return VLC_EGENERIC;
+    }
+
     strcpy( (char*)(p_data+i_offset), psz_password );
     i = i_offset + strlen(psz_password);
 



More information about the vlc-commits mailing list