Skip to content
Tcl Source Code Artifact [a8659bd4b2]
Login

Artifact [a8659bd4b2]

Artifact a8659bd4b267257d989aa1bcf4e0477e8fd66513:

Ticket change [a8659bd4b2] - Ticket [3484402fffffffff|3484402fff] <i>off-by-one address error in AppendUnicodeToUnicodeRep</i> status still Open with 4 other changes by dgp on 2012-02-08 21:56:11.
D 2012-02-08T21:56:11
J icomment \nThanks\sfor\sthe\sreview.\n\nRegarding\smemmove,\sconsider\sthis:\n\n\s\s\s\sobjPtr\s=\sTcl_NewStringObj("foo\sbar\sdingbat",\s-1);\n\s\s\s\sp\s=\sTcl_GetString(objPtr);\n\s\s\s\sTcl_SetObjLength(objPtr,\s3);\n\s\s\s\sTcl_AppendToObj(objPtr,\sp+7,\s8);\n\nwhich\sshould\sproduce\sthe\svalue\s'foo\sdingbat'.\n\nThat\sinvolves\sa\scopy\sof\soverlapping\sbyte\ssequences.\n\nSimilar\ssequence\swith\sthe\sunicode\srep\sis\salso\spossible.\n\nIt's\seasy\sto\sforget\sthat\sstringPtr->allocated\scan\sbe\sstrictly\nlarger\sthan\sobjPtr->length\s+\s1\sand\sstringPtr->uallocated\ncan\sbe\sstrictly\slarger\sthan\s(stringPtr->numChars\s+\s1)*sizeof(Tcl_UniChar)\n
J login dgp
J mimetype text/plain
J username dgp
K 3484402fffffffffffffffffffffffffffffffff
U dgp
Z dccfb282f9fd3d8a9ceb1d4e82ec5c13