X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=plugins%2Fgnome%2Fgnome_callbacks.c;h=e3f6a635bb0e6c485262136cf38ff75ef67e551a;hb=a70f8bb371466209770c4c3bcdb7137b94acef66;hp=64d89d4c05ff6426ab1c53217af8573603d4eef8;hpb=7f1f24b3aa593a6c426a86e9b707b162372a1b9f;p=vlc diff --git a/plugins/gnome/gnome_callbacks.c b/plugins/gnome/gnome_callbacks.c index 64d89d4c05..e3f6a635bb 100644 --- a/plugins/gnome/gnome_callbacks.c +++ b/plugins/gnome/gnome_callbacks.c @@ -2,7 +2,7 @@ * gnome_callbacks.c : Callbacks for the Gnome plugin. ***************************************************************************** * Copyright (C) 2000, 2001 VideoLAN - * $Id: gnome_callbacks.c,v 1.24 2001/04/22 00:08:26 stef Exp $ + * $Id: gnome_callbacks.c,v 1.25 2001/05/01 04:18:18 sam Exp $ * * Authors: Samuel Hocevar * Stéphane Borel @@ -1011,7 +1011,8 @@ on_disc_ok_clicked (GtkButton *button, GTK_WIDGET(button), "disc_name" ) ) ); /* "dvd:foo" has size 5 + strlen(foo) */ - psz_source = malloc( 5 + strlen( psz_device ) ); + psz_source = malloc( 3 /* "dvd" */ + 1 /* ":" */ + + strlen( psz_device ) + 1 /* "\0" */ ); if( psz_source == NULL ) { return; @@ -1110,7 +1111,9 @@ on_network_ok_clicked (GtkButton *button, } /* Allocate room for "protocol://server:port" */ - psz_source = malloc( strlen( psz_protocol ) + strlen( psz_server ) + 10 ); + psz_source = malloc( strlen( psz_protocol ) + 3 /* "://" */ + + strlen( psz_server ) + 1 /* ":" */ + + 5 /* 0-65535 */ + 1 /* "\0" */ ); if( psz_source == NULL ) { return;