|
2020-07-16
| ||
| 15:34 | cherry pick [df5f1e8652]: Fix [5bbd044812]: Fix index underflow. check-in: cba0864fb3 user: sebres tags: core-8-5-branch | |
| 13:46 | • Closed ticket [5bbd044812]: Fix index underflow plus 5 other changes artifact: 359a790df3 user: jan.nijtmans | |
| 13:45 | • Ticket [5bbd044812]: 4 changes artifact: 13944650b7 user: jan.nijtmans | |
| 13:42 | Fix [5bbd044812]: Fix index underflow. check-in: df5f1e8652 user: jan.nijtmans tags: core-8-6-branch | |
|
2020-05-27
| ||
| 13:28 | • New ticket [5bbd044812] Fix index underflow. artifact: 516420bba8 user: anonymous | |
Fix index underflow
Closed / Fixed5bbd044812bdb410016924337634b79d9892a8ffCreated 7 years agoUpdated 6 years ago
Descriptionplain2020-05-27 13:28:55
From 3f0d4884b97007112100a18e4a3cb95b193a1dec Mon Sep 17 00:00:00 2001 From: Andreas Schwab <[email protected]> Date: Wed, 27 May 2020 15:18:19 +0200 Subject: [PATCH] Fix index underflow --- generic/tclFileName.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 7ff7eecae..5e7b70dbe 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -2448,7 +2448,7 @@ DoGlob( size_t len; const char *joined = TclGetStringFromObj(joinedPtr,&len); - if (strchr(separators, joined[len-1]) == NULL) { + if (len != 0 && strchr(separators, joined[len-1]) == NULL) { Tcl_AppendToObj(joinedPtr, "/", 1); } } @@ -2485,7 +2485,7 @@ DoGlob( size_t len; const char *joined = TclGetStringFromObj(joinedPtr,&len); - if (strchr(separators, joined[len-1]) == NULL) { + if (len != 0 && strchr(separators, joined[len-1]) == NULL) { if (Tcl_FSGetPathType(pathPtr) != TCL_PATH_VOLUME_RELATIVE) { Tcl_AppendToObj(joinedPtr, "/", 1); } -- 2.26.2
Referenced by2
cba0864fb3cherry pick [df5f1e8652]: Fix [5bbd044812]: Fix index underflow. check-in2020-07-16 15:34:57df5f1e8652Fix [5bbd044812]: Fix index underflow. check-in2020-07-16 13:42:57
jan.nijtmanswiki2020-07-16 13:45:08
Fixed now in core-8-6-branch and up.
jan.nijtmans Closed ticket [5bbd044812].
[History diff]2020-07-16 13:46:45
Log in (anonymous is fine) to add a comment.