|
2014-05-08
| ||
| 17:45 | • Closed ticket [965a39e314]: crash during read from binary channel plus 6 oth... artifact: 26b0edaae5 user: dgp | |
|
2014-01-15
| ||
| 20:21 | [272e866f1e][965a39e314] Revise ReadBytes so that it uses the bytearray growth algorithm already in ... check-in: 128d902c33 user: dgp tags: bug-272e866f1e | |
|
2014-01-02
| ||
| 16:12 | • Ticket [965a39e314] crash during read from binary channel status still Open ... artifact: 144ad69a19 user: dgp | |
| 16:06 | • New ticket [965a39e314]. artifact: bce025f649 user: anonymous | |
crash during read from binary channel
Closed / Fixed965a39e3140dfbd1b1c443990fe47842e9d20ec5Created 13 years agoUpdated 13 years ago
Descriptionplain2014-01-02 16:06:43
Hi All,
from time to time I am facing a crash during read in tcl. I think the problem is in tclIO.c (see patch below). The new calculated length will be to small by 1 in case offset == toRead. The problem can be easily fixed by changing the if statement as shown below.
BR
René
--- ./generic/tclIO.c.orig 2014-01-02 16:40:20.399912000 +0100
+++ ./generic/tclIO.c 2014-01-02 16:40:53.290141000 +0100
@@ -5595,7 +5595,7 @@
*/
length = offset * 2;
- if (offset < toRead) {
+ if (offset <= toRead) {
length = offset + toRead + 1;
}
dst = (char *) Tcl_SetByteArrayLength(objPtr, length);
Referenced by1
128d902c33[272e866f1e][965a39e314] Revise ReadBytes so that it uses the bytearray growth algorithm already in TclAppendBytesToByteArray() rather than poorly making its own. check-in2014-01-15 20:21:07
dgpplain2014-01-02 16:12:01
Already looking at http://core.tcl.tk/tcl/tktview/272e866f1e and will take care of this at the same time.
dgpplain2014-05-08 17:45:19
This should be fixed now.
Log in (anonymous is fine) to add a comment.