[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
The win32 version of GNU make v3.79 can mangle paths that contain a trai
From: |
duncan . harvey |
Subject: |
The win32 version of GNU make v3.79 can mangle paths that contain a trailing slash. |
Date: |
Mon, 30 Oct 2000 15:30:56 +0000 |
The bug is on line 344 of dir.c
# ifdef WINDOWS32
/* Remove any trailing '\'. Windows32 stat fails even on valid
directories if they end in '\'. */
if (p[-1] == '\\')
p[-1] = '\0';
# endif
It modifies the argument that is passed into find_directory(). This is bad.
Specifically I've had it smash the PATH environment variable so that
sub-shells have an incomplete PATH. Depending on circumstances and system
setup this can randomly cause commands to fail (because Windows cannot locate
them).
To reproduce:
1) Add a trailing slash to any (but the final) path in your PATH
environment variable;
2) Run the attached makefile;
3) If Windows could find the shell (at all!), examine the environment.
Alternatively change the first path in PATH, run any makefile and watch it
fail.
============= Makefile ============
all:
cmd
===================================
--
Duncan Harvey
- The win32 version of GNU make v3.79 can mangle paths that contain a trailing slash.,
duncan . harvey <=