On Wed, 22 Aug 2012 00:16:10 -0500 Nicholas Hughart <mek...@mekius.net> said:

> On 08/21/2012 10:27 PM, Carsten Haitzler (The Rasterman) wrote:
> > On Tue, 21 Aug 2012 18:01:05 +0200 rustyBSD <rusty...@gmx.fr> said:
> >
> >> Hi,
> >> == e/src/modules/illume-keyboard/e_kbd_int.c ==
> >> line 972:   if (sscanf(buf, "%4000s", str) != 1) continue;
> >>
> >> str is declared like this: char str[PATH_MAX];
> >>
> >> Here, if PATH_MAX is < 4000, it could overflow.
> >> On my bsd, PATH_MAX is 1024, and I get a
> >> warning.
> >>
> >> Idem at line 1015 and 1030.
> > your PATH_MAX is only 1024? wow... quite a lot more limiting than i expect
> > from a modern OS... interesting.
> >
> Well Windows is quite a bit worse than that, 260 characters. Granted 
> they apparently have a new API which allows for more, but you have to 
> insert weird characters at the beginning and it doesn't sound like it's 
> good for everything.
> 
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247
> (v=vs.85).aspx#maxpath
> <http://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx#maxpath>
> 
> I guess this makes Windows an ancient OS :P

nah - it's better. read further:

The Windows API has many functions that also have Unicode versions to permit an
extended-length path for a maximum total path length of 32,767 characters. This
type of path is composed of components separated by backslashes, each up to the
value returned in the lpMaximumComponentLength parameter of the
GetVolumeInformation function (this value is commonly 255 characters). To
specify an extended-length path, use the "\\?\" prefix. For example, "\\?\D:
\very long path".

so 32k.. if u use the more modern "unicode" api's :)

-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to