summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.h
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-12-10 21:59:23 (GMT)
committernijtmans <nijtmans>2010-12-10 21:59:23 (GMT)
commit8bfe2a72f81586691fd3ddf6ff8b40b74aeb312d (patch)
treef5a596654db0ccc6fc206c51f688b6bd218ce97a /generic/tclIO.h
parentc62e68e149eae9355fd8af6bd73c7f50b291b9b8 (diff)
downloadtcl-8bfe2a72f81586691fd3ddf6ff8b40b74aeb312d.zip
tcl-8bfe2a72f81586691fd3ddf6ff8b40b74aeb312d.tar.gz
tcl-8bfe2a72f81586691fd3ddf6ff8b40b74aeb312d.tar.bz2
[Bug 3129448]: Possible over-allocation on 64-bit platforms, part 2
Diffstat (limited to 'generic/tclIO.h')
-rw-r--r--generic/tclIO.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclIO.h b/generic/tclIO.h
index 5ff855f..8616c69 100644
--- a/generic/tclIO.h
+++ b/generic/tclIO.h
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIO.h,v 1.17 2010/03/20 15:39:46 dkf Exp $
+ * RCS: @(#) $Id: tclIO.h,v 1.18 2010/12/10 21:59:24 nijtmans Exp $
*/
/*
@@ -65,13 +65,13 @@ typedef struct ChannelBuffer {
int bufLength; /* How big is the buffer? */
struct ChannelBuffer *nextPtr;
/* Next buffer in chain. */
- char buf[4]; /* Placeholder for real buffer. The real
- * buffer occuppies this space + bufSize-4
+ char buf[1]; /* Placeholder for real buffer. The real
+ * buffer occuppies this space + bufSize-1
* bytes. This must be the last field in the
* structure. */
} ChannelBuffer;
-#define CHANNELBUFFER_HEADER_SIZE (sizeof(ChannelBuffer) - 4)
+#define CHANNELBUFFER_HEADER_SIZE TclOffset(ChannelBuffer, buf)
/*
* How much extra space to allocate in buffer to hold bytes from previous