Re: Minor patch to correct buffer overrun
Paul Smith <[email protected]>
| Newsgroups | gmane.comp.gnu.make.windows |
|---|---|
| Organization | GNU's Not Unix! |
| Message-ID | <1282152759.2407.83.camel@homebase> |
On Wed, 2010-08-18 at 20:19 +0300, Eli Zaretskii wrote: > Can you explain what exactly was the problem with the original code? Well, if the size of tem was MAXPATHLEN, but the size of name was PATH_MAX or similar, and PATH_MAX is 1024 and MAXPATHLEN is 269 (or whatever it was), and your filename is long... that's a problem. I think the right fix is the one we were discussing earlier: all code that wants a static buffer large enough to house a pathname should be changed to use PATH_MAX, and we can tweak out make.h to set PATH_MAX to a useful value on any system where it's not yet set. -- ------------------------------------------------------------------------------- Paul D. Smith <[email protected]> Find some GNU make tips at: http://www.gnu.org http://make.mad-scientist.net "Please remain calm...I may be mad, but I am a professional." --Mad Scientist