]> git.sesse.net Git - vlc/commitdiff
Grow: fix crash when the password is NULL.
authorRémi Duraffort <ivoire@videolan.org>
Sun, 28 Mar 2010 16:22:34 +0000 (18:22 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Sun, 28 Mar 2010 16:22:34 +0000 (18:22 +0200)
modules/misc/notify/growl_udp.c

index 72764be2f344f5589be904c6999aefc17f9e349b..234a3d763aa5e981b25706c484413109d422c7da 100644 (file)
@@ -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);