[Xcb] [PATCH libXau] Avoid heap corruption when calling XauFileName from multiple threads.

Arnaud Fontaine arnaud at andesi.org
Mon Mar 28 04:28:15 PDT 2011


Hello,

    >      const char *slashDotXauthority = "/.Xauthority";
    >      char    *name;
    > -    static char        *buf;
    > -    static int bsize;
    > +    static char        buf[PATH_MAX] = {0};

Please  don't use  PATH_MAX. According  to  POSIX, PATH_MAX  may not  be
defined if an implement does not  have any limitation on the path length
(and GNU Hurd does not actually define it). Many thanks.

Cheers,
Arnaud


More information about the Xcb mailing list