Skip to content
Tcl Source Code Artifact [4dd9da46fd]
Login

Artifact [4dd9da46fd]

Artifact 4dd9da46fd8b0b4f91e8a51d9ad543dd28e5e81b8f9b273bc7e9e74b7871d6df:

Ticket change [4dd9da46fd] - Ticket [f2ff05fc8411be80|f2ff05fc84] <i>Usage of static systemEncoding is not thread safe (vulnerability)</i> status still Open with 3 other changes by sebres on 2024-04-26 14:45:45.
D 2024-04-26T14:45:45.530
J icomment The\sencoding\scache\sintroduced\sthere\sdoesn't\shave\sa\sgoal\sto\simprove\sperformance\sonly\s-\sthe\ssecond\smajor\sjob,\sit\sdoes,\sis\sa\sprotection\sof\s"vulnerable"\scall\s<i>Tcl_GetEncodingName(NULL)</i>\s(see\s[./artifact?name=9ad1b5848330ad5f&ln=984-987|lines\s984-987]\sfor\sdetails).<br/>\r\nThe\sissue\sis\s-\sso\sas\sit\sis\sconstructed,\sit\sis\simpossible\sto\srepair\scompletely,\sbecause\sthis\sfunction\sdoesn't\simply\sa\sdecrement\sof\sreference\sor\sfree\sof\sreturned\sname,\sso\sthe\scaller\smay\suse\sa\spointer\slater,\swhich\scan\sbe\sreleased\sby\sswitch\sof\ssystem\sencoding\s(e.\sg.\sby\sother\sthreads).\r\n\r\nNow\sthe\scache\savoids\sthat\ssituation,\sas\slong\sas\sthe\ssystem\sencoding\swould\snot\sbe\sswitched\stoo\soften\s(hardly\simaginable\sin\snormal\sregular\scase,\sthat\s4\sthreads\sswitch\sit\sto\smore\sthan\s4\sdifferent\sencodings\sat\sonce).<br/>\r\nThe\sfully\scorrect\sfix\swould\sonly\swork\swith\sthread-based\sencoding\s(TSD,\setc),\sbut\sthen\snot\sbackwards\scompatible\sanymore.
J login sebres
J mimetype text/x-fossil-wiki
K f2ff05fc8411be80a93913b2b065f2c85fa9bcf0
U sebres
Z 5855364bf34f31c8776478eec21bc91c