embedded NULL foils [info complete]
Closed / Fixed684744ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2003-02-11 17:07:53
The Tcl parse was rewritten for release 8.1
to allow for embedded NULL characters
to be treated just like any other character.
The parser is written to tokenize it like any
other. For example:
% proc bytestring s {return [encoding convertfrom
identity $s]}
% proc [bytestring \x00] {} {puts NULL}
% [bytestring \x00]
NULL
% eval [bytestring \x00]
NULL
However, an embedded NULL stops the parsing
of [info complete]:
% info complete [bytestring "\x00;if 1 \{"]
1
[info complete] never scans past the NULL
to discover the missing close-brace
incompleteness.
NOTE: This example will not work in the current
HEAD due to Tcl Bug 684699
dgpplain2003-02-12 00:35:35
Logged In: YES user_id=80530 please review, test, and commit this patch.
dgpplain2003-02-12 00:35:36
File Added - 42106: 684744.patch
msoferplain2003-02-12 01:11:27
Logged In: YES user_id=148712 Reviewed, tested, committed.
Log in (anonymous is fine) to add a comment.
Attachments:
- 684744.patch [download] added by dgp on 2003-02-12 00:35:36. [details]