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

Clément Bœsch ubitux at gmail.com
Sun Oct 17 18:28:43 CEST 2010


On Sun, Oct 17, 2010 at 06:11:58PM +0200, Reimar Döffinger wrote:
> 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).

Mmmh certainly a mistake ; i must have thought the server_url wasn't
enought and badly tested it. Thanks for the fix :)

-- 
Clément B.


More information about the MPlayer-dev-eng mailing list