[MPlayer-dev-eng] [PATCH] Fix crash with empty http_proxy

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Oct 17 18:11:58 CEST 2010


On Sat, Oct 16, 2010 at 07:45:16PM +0200, Clément Bœsch wrote:
> Index: stream/url.c
> ===================================================================
> --- stream/url.c	(revision 32493)
> +++ stream/url.c	(working copy)
> @@ -66,7 +66,7 @@
>  	char *ptr1=NULL, *ptr2=NULL, *ptr3=NULL, *ptr4=NULL;
>  	int jumpSize = 3;
>  
> -	if( url==NULL ) return NULL;
> +	if( url==NULL || !*url ) return NULL;
>  
>          if (strlen(url) > (SIZE_MAX / 3 - 1)) {
>                  mp_msg(MSGT_NETWORK,MSGL_FATAL,MSGTR_MemAllocFailed);

Other part applied (slightly differently) but why this?
I think it's wrong, a empty URL should be valid and
equivalent to something like file://. (i.e. indicate
the current directory).


More information about the MPlayer-dev-eng mailing list