[vlc-commits] commit: Grow: fix crash when the password is NULL. ( Rémi Duraffort )
git at videolan.org
git at videolan.org
Sat Apr 17 11:58:52 CEST 2010
vlc/vlc-1.0 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Mar 28 18:22:34 2010 +0200| [fc9011cc026b9ae7e14952e2f916514196717282] | committer: Rémi Duraffort
Grow: fix crash when the password is NULL.
(cherry picked from commit 5ef889a45334e524519e976d7a7ff80679b614f8)
Signed-off-by: Rémi Duraffort <ivoire at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.0.git/?a=commit;h=fc9011cc026b9ae7e14952e2f916514196717282
---
modules/misc/notify/growl_udp.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/modules/misc/notify/growl_udp.c b/modules/misc/notify/growl_udp.c
index 8fffe27..a333d3c 100644
--- a/modules/misc/notify/growl_udp.c
+++ b/modules/misc/notify/growl_udp.c
@@ -262,6 +262,13 @@ static int CheckAndSend( vlc_object_t *p_this, uint8_t* p_data, int i_offset )
char *psz_server = config_GetPsz( p_this, "growl-server" );
int i_port = config_GetInt( 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