diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-13 13:23:35 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-13 13:23:35 (GMT) |
| commit | 1dec5c759982e209781ee01e37a72d19be2077a2 (patch) | |
| tree | 489b2854a80998671d7bbe8d7d5e32ca062101c8 | |
| parent | 59ea58aa8b77e8fcc65fda73b2e021481fb34171 (diff) | |
| parent | 8a90d26eafca6f78203e2af6e227e6404041b851 (diff) | |
| download | tcl-1dec5c759982e209781ee01e37a72d19be2077a2.zip tcl-1dec5c759982e209781ee01e37a72d19be2077a2.tar.gz tcl-1dec5c759982e209781ee01e37a72d19be2077a2.tar.bz2 | |
Merge 8.7
| -rw-r--r-- | generic/tclCompile.h | 18 | ||||
| -rw-r--r-- | generic/tclExecute.c | 4 | ||||
| -rw-r--r-- | generic/tclProc.c | 2 |
3 files changed, 13 insertions, 11 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 98885e1..b7d98b6 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -1473,22 +1473,22 @@ MODULE_SCOPE int TclPushProcCallFrame(void *clientData, # define TclGetInt1AtPtr(p) ((int) *((signed char *) p)) #else # define TclGetInt1AtPtr(p) \ - (((int) *((char *) p)) | ((*(p) & 0200) ? (-256) : 0)) + ((int) ((*((char *) p)) | ((*(p) & 0200) ? (-256) : 0))) #endif #define TclGetInt4AtPtr(p) \ - (((int) (TclGetUInt1AtPtr(p) << 24)) | \ - (*((p)+1) << 16) | \ - (*((p)+2) << 8) | \ - (*((p)+3))) + ((int) ((TclGetUInt1AtPtr(p) << 24) | \ + (*((p)+1) << 16) | \ + (*((p)+2) << 8) | \ + (*((p)+3)))) #define TclGetUInt1AtPtr(p) \ ((unsigned int) *(p)) #define TclGetUInt4AtPtr(p) \ - ((unsigned int) (*(p) << 24) | \ - (*((p)+1) << 16) | \ - (*((p)+2) << 8) | \ - (*((p)+3))) + ((unsigned int) ((*(p) << 24) | \ + (*((p)+1) << 16) | \ + (*((p)+2) << 8) | \ + (*((p)+3)))) /* * Macros used to compute the minimum and maximum of two integers. The ANSI C diff --git a/generic/tclExecute.c b/generic/tclExecute.c index b2431f5..6aa0e0a 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -5328,7 +5328,9 @@ TEBCresume( p = ustring1; end = ustring1 + slength; for (; ustring1 < end; ustring1++) { - if ((*ustring1 == *ustring2) && (length2==1 || + if ((*ustring1 == *ustring2) && + /* Fix bug [69218ab7b]: restrict max compare length. */ + (end-ustring1 >= length2) && (length2==1 || memcmp(ustring1, ustring2, sizeof(Tcl_UniChar) * length2) == 0)) { if (p != ustring1) { diff --git a/generic/tclProc.c b/generic/tclProc.c index 77abac0..28538b1 100644 --- a/generic/tclProc.c +++ b/generic/tclProc.c @@ -1386,7 +1386,6 @@ InitArgsAndLocals( numArgs = procPtr->numArgs; argCt = framePtr->objc - skip; /* Set it to the number of args to the * procedure. */ - argObjs = framePtr->objv + skip; if (numArgs == 0) { if (argCt) { goto incorrectArgs; @@ -1394,6 +1393,7 @@ InitArgsAndLocals( goto correctArgs; } } + argObjs = framePtr->objv + skip; imax = ((argCt < numArgs-1) ? argCt : numArgs-1); for (i = 0; i < imax; i++, varPtr++, defPtr ? defPtr++ : defPtr) { /* |
