diff options
author | nijtmans <nijtmans> | 2011-01-25 08:31:37 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2011-01-25 08:31:37 (GMT) |
commit | e879651f606df661d88f8b3ae73bdbbd37d4082c (patch) | |
tree | 5102c8db204c464ad05ae31f1603514f24068789 /win | |
parent | a997d84bbfd5ab7b01bebf18efbc60b358770bc0 (diff) | |
download | tk-e879651f606df661d88f8b3ae73bdbbd37d4082c.zip tk-e879651f606df661d88f8b3ae73bdbbd37d4082c.tar.gz tk-e879651f606df661d88f8b3ae73bdbbd37d4082c.tar.bz2 |
[Patch #3129527]: Fix buffer overflow w/ GCC 4.5 and -D_FORTIFY_SOURCE=2.
Just the strcpy->memcpy part, to prevent anything like [Bug #3164879]
Diffstat (limited to 'win')
-rw-r--r-- | win/tkWinWm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 5685ac0..67c2a6e 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinWm.c,v 1.124.2.9 2010/03/12 13:02:36 nijtmans Exp $ + * RCS: @(#) $Id: tkWinWm.c,v 1.124.2.10 2011/01/25 08:31:37 nijtmans Exp $ */ #include "tkWinInt.h" @@ -5005,7 +5005,7 @@ WmProtocolCmd( protPtr->nextPtr = wmPtr->protPtr; wmPtr->protPtr = protPtr; protPtr->interp = interp; - strcpy(protPtr->command, cmd); + memcpy(protPtr->command, cmd, cmdLength + 1); } return TCL_OK; } |