bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, st


From: Matthew White
Subject: Re: [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, strip directory if necessary
Date: Tue, 13 Sep 2016 05:37:24 +0200

On Mon, 12 Sep 2016 13:00:32 +0200
Tim Ruehsen <address@hidden> wrote:

> On Saturday, September 10, 2016 12:49:50 PM CEST Matthew White wrote:
> 
> > +int metalink_check_safe_path(const char *path);
> 
> One space before (, please ;-)

Fixed. Posting after final decisions are taken about open topics in this series 
of patches.

> 
> > +  char *basename = name;
> > +
> > +  while ((name = strstr (basename, "/")))
> > +    basename = name + 1;
> 
> Could you use strrchr() ? something like
> 
> char *basename = strrchr (name, '/');
> 
> if (basename)
>   basename += 1;
> else
>   basename = name;

Thanks, a very elegant solution. It's still an open topic, though.

> 
> Regards, Tim

Regards,
Matthew

-- 
Matthew White <address@hidden>

Attachment: pgpKF2NtXKH8a.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]