Tcl Source Code

Artifact [833601c82a]
Login

Artifact 833601c82a69a0b7e144770ec8c46dbd4f201d04:

Attachment "buffersize.patch" to ticket [1969953fff] added by ferrieux 2008-05-23 04:57:08.
Index: tclIO.c
===================================================================
RCS file: /cvsroot/tcl/tcl/generic/tclIO.c,v
retrieving revision 1.142
diff -r1.142 tclIO.c
6931a6932,6933
> #define MAX_CHANNEL_BUFFER_SIZE (1024*1024)
> 
6940,6941c6942
<      * If the buffer size is smaller than 1 byte or larger than one MByte, do
<      * not accept the requested size and leave the current buffer size.
---
>      * Clip the buffer size to force it into the [1,1M] range
6944,6946c6945,6946
<     if (sz < 1 || sz > 1024*1024) {
< 	return;
<     }
---
>     if (sz < 1) sz=1;
>     if (sz > MAX_CHANNEL_BUFFER_SIZE) sz=MAX_CHANNEL_BUFFER_SIZE;