Artifacts Associated With Ticket 1518166fffffffff
Ticket change [17abf9a05e] (rid 122538) by afredd on 2006-07-06 14:01:04:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
In the latest tclWinSock.c (1.54), in the function InitializeHostName there is a possible logic path in which the DString "ds" is not Init'd but then used & Free'd. Bad voodoo :-) (Also is the fact that one branch lower cases the hostname string and the other not of any signifcance?)
- foundin initialized to: "obsolete: 8.5a5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "afredd"
- subsystem initialized to: "None"
- title initialized to: "Possible un-Init'd DString in latest tclWinSock.c"
- type initialized to: "Bug"
Ticket change [b289a3b3bb] (rid 98350) by dgp on 2006-07-10 22:36:36:
- assignee changed to: "dgp"
- subsystem changed to: "27. Channel Types"
Ticket change [ca0a13bc4b] (rid 122394) by dgp on 2006-07-11 03:12:29:
- icomment:
Logged In: YES user_id=80530 Tcl_WinTCharToUtf() is documented to take an uninitialized Tcl_DString. Look like the init/free balance is correct to me. Looks like the code assumes the value returned by gethostname() is in lowercase. If there's reason to believe that assumption can fail, the Tcl_UtfToLower() call can be added to the lower branch. The same maintainers who could answer that definitively could supply the proper buffer size requested in the code comments.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "1 Zero"
- username: "dgp"
- icomment:
Ticket change [7a668d42a9] (rid 90312) by afredd on 2006-07-24 17:11:50:
- icomment:
Logged In: YES user_id=1386588 >Look like the init/free balance is correct to me. What if neither of the if or 'else if' expressions is true? The code outline is: Tcl_DString ds; if ((*tclWinProcs->getComputerNameProc)(wbuf, &length) != 0) { /* Initialise ds */ } else if (TclpHasSockets(NULL) == TCL_OK) { /* Initialise ds */ } /* Use ds */ Tcl_DStringFree(&ds); Are you assuming that one of the two test expressions (in particular "TclpHasSockets(NULL)") will always be true? - login: "afredd"
- mimetype: "text/plain"
- username: "afredd"
- icomment:
Ticket change [308582fb68] (rid 93271) by dgp on 2006-07-24 20:42:56:
- icomment:
Logged In: YES user_id=80530 I see. Fix committed.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [ffe6eb3ff3] (rid 108843) by dgp on 2006-07-24 20:43:42:
- closedate changed to: "2006-07-24T13:43:42"
- closer changed to: "dgp"
- resolution changed to: "Fixed"
- status changed to: "Closed"