diff options
author | Steve Bennett <steveb@workware.net.au> | 2022-12-26 09:17:58 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2022-12-26 09:19:57 +1000 |
commit | 9b754b8033b9f2a1dc8ba1227df2e5d75185dda7 (patch) | |
tree | cf995dcbfeaae549afc111d91b805eb8124b0f28 /jim-file.c | |
parent | c9f2fdaede9414e65f4c19174b0c4e8244830e28 (diff) | |
download | jimtcl-9b754b8033b9f2a1dc8ba1227df2e5d75185dda7.zip jimtcl-9b754b8033b9f2a1dc8ba1227df2e5d75185dda7.tar.gz jimtcl-9b754b8033b9f2a1dc8ba1227df2e5d75185dda7.tar.bz2 |
file normalise: ensure realpath() buffer is long enough
On some systems, 1024 isn't enough so use PATH_MAX if available.
Fixes: #247
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-file.c')
-rw-r--r-- | jim-file.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -68,8 +68,12 @@ #endif # ifndef MAXPATHLEN +# ifdef PATH_MAX +# define MAXPATHLEN PATH_MAX +# else # define MAXPATHLEN JIM_PATH_LEN # endif +# endif #if defined(__MINGW32__) || defined(__MSYS__) || defined(_MSC_VER) #define ISWINDOWS 1 |