Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | 3366265 Allocate proper size buffer for TclConvertElement() to write to. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
828fc551b105c4bba980eafa978b3a57 |
User & Date: | dgp 2011-07-14 03:19:31 |
Context
2011-07-15
| ||
11:45 | [Bug 3365156]: Remove stray refcount bump that caused a memory leak. check-in: c02169bafa user: dkf tags: trunk | |
2011-07-14
| ||
03:19 | 3366265 Allocate proper size buffer for TclConvertElement() to write to. check-in: 828fc551b1 user: dgp tags: trunk | |
02:39 | 3366265 Allocate proper size buffer for TclConvertElement() to write to. check-in: edfd80bc20 user: dgp tags: core-8-5-branch | |
2011-07-12
| ||
19:10 | 3364777 Stop segfault caused by reading from struct after it had been freed. check-in: 69fd1683a0 user: dgp tags: trunk | |
Changes
Changes to generic/tclIndexObj.c.
︙ | ︙ | |||
950 951 952 953 954 955 956 | } else { elementStr = TclGetStringFromObj(origObjv[i], &elemLen); } flags = 0; len = TclScanElement(elementStr, elemLen, &flags); if (MAY_QUOTE_WORD && len != elemLen) { | | > | 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 | } else { elementStr = TclGetStringFromObj(origObjv[i], &elemLen); } flags = 0; len = TclScanElement(elementStr, elemLen, &flags); if (MAY_QUOTE_WORD && len != elemLen) { char *quotedElementStr = TclStackAlloc(interp, (unsigned)len + 1); len = TclConvertElement(elementStr, elemLen, quotedElementStr, flags); Tcl_AppendToObj(objPtr, quotedElementStr, len); TclStackFree(interp, quotedElementStr); } else { Tcl_AppendToObj(objPtr, elementStr, elemLen); |
︙ | ︙ | |||
1005 1006 1007 1008 1009 1010 1011 | */ elementStr = TclGetStringFromObj(objv[i], &elemLen); flags = 0; len = TclScanElement(elementStr, elemLen, &flags); if (MAY_QUOTE_WORD && len != elemLen) { | | > | 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 | */ elementStr = TclGetStringFromObj(objv[i], &elemLen); flags = 0; len = TclScanElement(elementStr, elemLen, &flags); if (MAY_QUOTE_WORD && len != elemLen) { char *quotedElementStr = TclStackAlloc(interp, (unsigned) len + 1); len = TclConvertElement(elementStr, elemLen, quotedElementStr, flags); Tcl_AppendToObj(objPtr, quotedElementStr, len); TclStackFree(interp, quotedElementStr); } else { Tcl_AppendToObj(objPtr, elementStr, elemLen); |
︙ | ︙ |
Changes to tests/proc.test.
︙ | ︙ | |||
182 183 184 185 186 187 188 189 190 191 192 193 194 195 | proc p {x} {info commands 3m} p } -returnCodes error -result {wrong # args: should be "p x"} test proc-3.6 {TclObjInterpProc, proper quoting of proc name, Bug 942757} -body { proc {a b c} {x} {info commands 3m} {a b c} } -returnCodes error -result {wrong # args: should be "{a b c} x"} catch {namespace delete {*}[namespace children :: test_ns_*]} catch {rename p ""} catch {rename {} ""} catch {rename {a b c} {}} catch {unset msg} | > > > > > | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 | proc p {x} {info commands 3m} p } -returnCodes error -result {wrong # args: should be "p x"} test proc-3.6 {TclObjInterpProc, proper quoting of proc name, Bug 942757} -body { proc {a b c} {x} {info commands 3m} {a b c} } -returnCodes error -result {wrong # args: should be "{a b c} x"} test proc-3.7 {TclObjInterpProc, wrong num args, Bug 3366265} { proc {} {x} {} list [catch {{}} msg] $msg } {1 {wrong # args: should be "{} x"}} catch {namespace delete {*}[namespace children :: test_ns_*]} catch {rename p ""} catch {rename {} ""} catch {rename {a b c} {}} catch {unset msg} |
︙ | ︙ |