Tcl Source Code

View Ticket
Login
Ticket UUID: 684744
Title: embedded NULL foils [info complete]
Type: Bug Version: obsolete: 8.4.1
Submitter: dgp Created on: 2003-02-11 17:07:53
Subsystem: 45. Parsing and Eval Assigned To: msofer
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2003-02-12 01:11:27
Resolution: Fixed Closed By: msofer
    Closed on: 2003-02-11 18:11:27
Description:
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
User Comments: msofer added on 2003-02-12 01:11:27:
Logged In: YES 
user_id=148712

Reviewed, tested, committed.

dgp added on 2003-02-12 00:35:36:

File Added - 42106: 684744.patch

dgp added on 2003-02-12 00:35:35:
Logged In: YES 
user_id=80530

please review, test, and commit this patch.

Attachments: