Menu

#3 lack of proper Tcl quoting of values in results

v1.0 (example)
open
nobody
None
5
2008-03-13
2008-03-13
No

The various get, getnext, walk, etc. commands return on success a Tcl list of values which is built by hand by explicitly surrounding values with curly braces.

Said values are not quoted, possibly resulting in invalid Tcl lists when a value contains curly braces.

A way to fix this could be using Tcl_DStringAppendElement() instead of Tcl_DStringAppend() when appending values to the result: it takes care of quoting values, inserting a separator from previous elements and surrounding the values with curly braces if needed (basically, it is equivalent to a "lappend Result $value").

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.