Svante Signell, le Tue 15 Apr 2014 12:07:22 +0200, a écrit :
> > Will obviously crash. Did you try your code at all?
> 
> I wrote a test program and run that one through valgind. Better now?

Did you really make your program go through your patched code?

> +     dfp = xdstrdup(efp);

That doesn't get free in the if branch.

>       if (tmp) {
> -             fp = tmp + 7;
> -             if (fp[0] == '/' && fp[2] == ':') {
> -                     fp++;
> +             dfp = tmp + 7;
> +             if (dfp[0] == '/' && dfp[2] == ':') {
> +                     dfp++;
>               }
> -             ret = xdstrdup(fp);
> +             ret = xdstrdup(dfp);
> +             free(tmp);
>  #ifdef PHP_WIN32
>               l = strlen(ret);
>               /* convert '/' to '\' */
> @@ -314,8 +314,8 @@ char *xdebug_path_from_url(const char *f
>  #endif
>       } else {
>               ret = xdstrdup(fileurl);
> +             free(dfp);
>       }
> -
>       return ret;
>  }
>  


-- 
Samuel
<T> csp.tar.gz:     ascii text
 -+- #ens-mim - vive les browsers qui prennent des initiatives à la con -+-


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: https://lists.debian.org/[email protected]

Reply via email to