diff options
author | nijtmans <nijtmans@noemail.net> | 2010-12-10 21:59:22 (GMT) |
---|---|---|
committer | nijtmans <nijtmans@noemail.net> | 2010-12-10 21:59:22 (GMT) |
commit | 6611242d2576ae12ed7693024aa5cf6da1bc5926 (patch) | |
tree | f5a596654db0ccc6fc206c51f688b6bd218ce97a /generic/tclIO.h | |
parent | d6108b63f17b35327ea08d36a34681efec79bad5 (diff) | |
download | tcl-6611242d2576ae12ed7693024aa5cf6da1bc5926.zip tcl-6611242d2576ae12ed7693024aa5cf6da1bc5926.tar.gz tcl-6611242d2576ae12ed7693024aa5cf6da1bc5926.tar.bz2 |
[Bug 3129448]: Possible over-allocation on 64-bit platforms, part 2
FossilOrigin-Name: e6ddd08613c8541a6cf7140ee21f67cef0244520
Diffstat (limited to 'generic/tclIO.h')
-rw-r--r-- | generic/tclIO.h | 8 |
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 |