make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Minor patch to correct buffer overrun


From: Chris Sutcliffe
Subject: Minor patch to correct buffer overrun
Date: Mon, 16 Aug 2010 09:17:24 -0400

As reported on the MinGW-Users mailing list, there is an issue with
buffer overrun regarding 'MAXPATHLEN'.  MinGW's sys/param.h defines
'MAXPATHLEN' as follows:

#define MAXPATHLEN PATH_MAX

where 'PATH_MAX' is 259.  The issue is that make expects 'MAXPATHLEN'
to be considerably bigger (1024).  To correct for it, I created this
small patch:

--- make.h.orig 2010-07-20 09:12:06 -0400
+++ make.h      2010-08-16 08:50:54 -0400
@@ -130,6 +130,9 @@
 #  define PATH_MAX      MAXPATHLEN
 # endif
 #endif
+#ifdef __MINGW32__
+# undef MAXPATHLEN
+#endif
 #ifndef MAXPATHLEN
 # define MAXPATHLEN 1024
 #endif

Cheers!

Chris

-- 
Chris Sutcliffe
http://emergedesktop.org
http://www.google.com/profiles/ir0nh34d



reply via email to

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