Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2005:
[Freeciv-Dev] Re: (PR#13463) New function to eval safety of filenames
Home

[Freeciv-Dev] Re: (PR#13463) New function to eval safety of filenames

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#13463) New function to eval safety of filenames
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Wed, 13 Jul 2005 02:12:28 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13463 >

On Tue, Jul 12, 2005 at 07:45:25PM -0700, Benoit Hudson wrote:
> 
> <URL: http://bugs.freeciv.org/Ticket/Display.html?id=13463 >
> 
> > +    if (!((name[i] <= 'z' && name[i] >= 'a')
> > +          || (name[i] <= 'Z' && name[i] >= 'A')
> > +          || (name[i] <= '9' && name[i] >= '0')
> > +          || name[i] == '-'
> > +          || name[i] == '_')) {
> > +      return FALSE;
> 
> This assume ascii; while probably safe, we may want to use the
> functions in ctype.h like isalnum.

These functions depend on the current locale. This maybe not be what
is wanted here.

        Raimar

-- 
 email: i-freeciv-lists@xxxxxxxxxxxxx
 "This is Linux Country. On a quiet night, you can hear Windows reboot."





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