summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-02-19 01:05:27 (GMT)
committerhobbs <hobbs>2003-02-19 01:05:27 (GMT)
commit8f0f9765065901d39650a0f204dda8f4687155f5 (patch)
treeb744ff10b50ebd18053e9a82b43f00beef074bcf
parent8b1b828ae2abf9c2992239a94a7eaec9475b0ec0 (diff)
downloadtcl-8f0f9765065901d39650a0f204dda8f4687155f5.zip
tcl-8f0f9765065901d39650a0f204dda8f4687155f5.tar.gz
tcl-8f0f9765065901d39650a0f204dda8f4687155f5.tar.bz2
* unix/tclUnixThrd.c (TclpReaddir): reduce size of name string in
tsd to NAME_MAX instead of PATH_MAX. [Bug #689100] (waters)
-rw-r--r--ChangeLog9
-rw-r--r--unix/tclUnixThrd.c6
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 504988f..65a1dcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-02-18 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * generic/tclIO.c (HaveVersion): correctly decl static
+
+ * unix/tclUnixThrd.c (TclpReaddir): reduce size of name string in
+ tsd to NAME_MAX instead of PATH_MAX. [Bug #689100] (waters)
+
2003-02-18 Mo DeJong <mdejong@users.sourceforge.net>
* unix/configure: Regen.
@@ -9,7 +16,7 @@
* generic/tclTest.c: cleanup of new 'simplefs' test code, and
better documentation.
-
+
2003-02-17 Miguel Sofer <msofer@users.sf.net>
* generic/tclBasic.c (TclRenameCommand): fixing error in previous
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 1dd2d99..28267f4 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -25,7 +25,9 @@ typedef struct ThreadSpecificData {
struct tm ltbuf;
struct {
Tcl_DirEntry ent;
- char name[PATH_MAX+1];
+#ifdef NAME_MAX /* if not, dirent *better* have room for name */
+ char name[NAME_MAX+1];
+#endif
} rdbuf;
} ThreadSpecificData;
@@ -819,7 +821,7 @@ TclpReaddir(DIR * dir)
# endif /* HAVE_STRUCT_DIRENT64 */
if (ent != NULL) {
memcpy((VOID *) &tsdPtr->rdbuf.ent, (VOID *) ent,
- sizeof(Tcl_DirEntry) + sizeof(char) * (PATH_MAX+1));
+ sizeof(&tsdPtr->rdbuf));
ent = &tsdPtr->rdbuf.ent;
}
Tcl_MutexUnlock(&rdMutex);