]> de.git.xonotic.org Git - xonotic/netradiant.git/commit
q3map2: bump MAX_OS_PATH to 4096
authorBen Noordhuis <info@bnoordhuis.nl>
Sun, 18 Mar 2012 01:02:48 +0000 (02:02 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Sun, 18 Mar 2012 01:17:09 +0000 (02:17 +0100)
commitf961a547ff4230225315d027c5ce4845d5ba420d
treef03ac7a1109022e9f8f45bd354cf5824c9c2e8eb
parent3a959349aca0d064373da680d4c79b66e551e04a
q3map2: bump MAX_OS_PATH to 4096

Fixes a "buffer overflow detected" abort when compiled with _FORTIFY_SOURCE=1.

The realpath(3) function in glibc checks if the destination buffer is large
enough to hold up to PATH_MAX characters and aborts if that is not the case.
PATH_MAX doesn't have to be defined so assume that it's equal to 4096.

We should really be using pathconf(_PC_PATH_MAX) instead of a hard-coded value
but that means we can no longer use static buffers to hold paths.
tools/quake3/common/cmdlib.h