From: | "Ryan Hill (dirtyepic)" <dirtyepic@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in dev-lang/tcl/files: tcl-8.5.8-fortify.patch |
Date: | Thu, 19 Aug 2010 05:25:41 |
Message-Id: | 20100819052536.D39A92004C@flycatcher.gentoo.org |
1 | dirtyepic 10/08/19 05:25:36 |
2 | |
3 | Added: tcl-8.5.8-fortify.patch |
4 | Log: |
5 | Fix buffer overflow with GCC 4.5 and -D_FORTIFY_SOURCE=2 (bug #317727 by |
6 | Diego). |
7 | (Portage version: 2.2_rc67/cvs/Linux x86_64) |
8 | |
9 | Revision Changes Path |
10 | 1.1 dev-lang/tcl/files/tcl-8.5.8-fortify.patch |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/tcl/files/tcl-8.5.8-fortify.patch?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/tcl/files/tcl-8.5.8-fortify.patch?rev=1.1&content-type=text/plain |
14 | |
15 | Index: tcl-8.5.8-fortify.patch |
16 | =================================================================== |
17 | Fix buffer overflow with GCC 4.5 -D_FORTIFY_SOURCE=2. |
18 | https://bugs.gentoo.org/317727 |
19 | |
20 | https://sourceforge.net/tracker/?func=detail&aid=3048354&group_id=10894&atid=310894 |
21 | |
22 | --- a/generic/tclTrace.c |
23 | +++ b/generic/tclTrace.c |
24 | @@ -909,7 +909,7 @@ TraceVariableObjCmd( |
25 | } |
26 | ctvarPtr->traceCmdInfo.length = length; |
27 | flags |= TCL_TRACE_UNSETS | TCL_TRACE_RESULT_OBJECT; |
28 | - strcpy(ctvarPtr->traceCmdInfo.command, command); |
29 | + memcpy(ctvarPtr->traceCmdInfo.command, command, length + 1); |
30 | ctvarPtr->traceInfo.traceProc = TraceVarProc; |
31 | ctvarPtr->traceInfo.clientData = (ClientData) |
32 | &ctvarPtr->traceCmdInfo; |