[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: |
Eli Zaretskii |
Subject: |
Re: [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, strip directory if necessary |
Date: |
Mon, 12 Sep 2016 20:18:30 +0300 |
> From: Tim Ruehsen <address@hidden>
> Date: Mon, 12 Sep 2016 13:00:32 +0200
>
> > + 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;
I think we want to use ISSEP, no? Otherwise Windows file names with
backslashes will misfire.
- [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, strip directory if necessary, Matthew White, 2016/09/10
- Re: [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, strip directory if necessary, Tim Ruehsen, 2016/09/12
- Re: [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, strip directory if necessary,
Eli Zaretskii <=
- Re: [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, strip directory if necessary, Tim Rühsen, 2016/09/12
- Re: [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, strip directory if necessary, Matthew White, 2016/09/12
- Re: [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, strip directory if necessary, Tim Ruehsen, 2016/09/13
- Re: [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, strip directory if necessary, Matthew White, 2016/09/13
- Re: [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, strip directory if necessary, Tim Ruehsen, 2016/09/13
- Re: [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, strip directory if necessary, Matthew White, 2016/09/13
- Re: [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, strip directory if necessary, Matthew White, 2016/09/12
Re: [Bug-wget] [PATCH 09/25] Enforce Metalink file name verification, strip directory if necessary, Matthew White, 2016/09/12