void-packages/srcpkgs/opensmtpd/patches/glibc-fortify-source-path-max.patch
Juan RP 01523bbb48 opensmtpd: fix realpath() on glibc with FORTIFY_SOURCE.
PATH_MAX must be at least 4096, otherwise glibc will abort because it
thinks there's a buffer overflow if it's compiled with _FORTIFY_SOURCE.
2015-04-01 12:30:42 +02:00

18 lines
528 B
Diff

Don't override PATH_MAX, glibc with FORTIFY_SOURCE exactly wants
it as 4096 bytes at least, otherwise it will abort().
-- xtraeme
--- openbsd-compat/defines.h.orig 2015-04-01 12:25:34.304411927 +0200
+++ openbsd-compat/defines.h 2015-04-01 12:26:10.832810710 +0200
@@ -65,10 +65,6 @@ enum
* Looks like ugly, but MAX_IMSGSIZE equals 16384,
* and if we don't care it will overflow for some struct
*/
-#if PATH_MAX > 1024
-# undef PATH_MAX
-# define PATH_MAX 1024
-#endif
#if MAXPATHLEN > 1024
# undef MAXPATHLEN