Overview
| Artifact ID: | 21ca88b3e2f96ea5fc9c98f68f383ac35dcd3823 |
|---|---|
| Ticket: | 979640ffffffffffffffffffffffffffffffffff
Buffer overruns mixing C and Tcl environment changes |
| User & Date: | eyekode on 2011-10-26 03:33:26 |
Changes
- icomment:
I have hit this bug in my application as well (Linux platform). We are using Tcl 8.4.5 and unfortunately I cannot upgrade the version of Tcl for quite some time. Looks like I have the following options: 1) define USE_PUTENV 2) attempt to backport this change into my 8.4.5 source tree. 3) rewrite TclSetEnv/TclUnsetEnv to use libc's setenv() and unsetenv(). I will try 1 first. I don't yet understand the drawbacks. It looks like it should work the same. Can anyone explain why Tcl by default directly modifies environ? #2 is not straight forward but I may give it a shot. #3 seems pretty simple. Unfortunately I can't use a simple -DTclSetEnv=setenv because setenv() takes 3 args. Note unix/Makefile makes it look like this is all that is needed... not sure when that line would work. TIA for any feedback!
- login: "eyekode"
- mimetype: "text/plain"
- username: "eyekode"