From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <474D8E37.6000600@sandy.ru> Date: Wed, 28 Nov 2007 18:50:15 +0300 From: Dmitriy Khanzhin User-Agent: Thunderbird 2.0.0.6 (X11/20070804) MIME-Version: 1.0 To: ALT Linux Team development discussions References: <20071125120814.GA22522@basalt.office.altlinux.org> <20071125195520.GS28492@osdn.org.ua> <20071125211632.GC30421@basalt.office.altlinux.org> <20071126085538.GB13915@mw.local.seiros.ru> <474C3898.6090500@sandy.ru> <20071127154518.GM11953@basalt.office.altlinux.org> <75e139a00711272256i770bd25ci550debea6f99b693@mail.gmail.com> <20071128113328.GD32244@basalt.office.altlinux.org> <679044850711280500x4213b54dk16d70e820595622b@mail.gmail.com> In-Reply-To: <679044850711280500x4213b54dk16d70e820595622b@mail.gmail.com> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Subject: Re: [devel] IA: destination buffer overflow - ppp X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Nov 2007 15:51:07 -0000 Archived-At: List-Archive: List-Post: Damir Shayhutdinov =D0=C9=DB=C5=D4: >>> 2007/11/27, Dmitry V. Levin : >>>> On Tue, Nov 27, 2007 at 06:32:40PM +0300, Dmitriy Khanzhin wrote: >>>>> - strncat(ttyname, name, sizeof(ttyname)); >>> + strncat(ttyname, name, sizeof(ttyname)-1); >>> >>>> =E1=D7=D4=CF=D2 =DC=D4=CF=C7=CF =CB=CF=C4=C1 =CE=C5 =D3=D0=D2=C1=D7=C9= =CC=D3=D1 =D3 =C6=D5=CE=CB=C3=C9=C5=CA strncat. >>>> =E9=D3=D0=D2=C1=D7=CC=C5=CE=C9=C5 =D4=D2=C9=D7=C9=C1=CC=D8=CE=CF. >>> =E6=C9=CB=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0=D2=C1=D7=C9=CC=D8=CE=C5=C5 =C2=D5=C4=C5=D4 strn= cat(ttyname, name, sizeof(ttyname) - > strlen(ttyname) - 1, =C9=CC=C9 =D0=D2=CF=D3=D4=CF > strlcat(ttyname, name, sizeof(ttyname)). =EF =CB=C1=CB! =EF=C7=D2=CF=CD=CE=CF=C5 =D3=D0=C1=D3=C9=C2=CF =DA=C1 =D0=CF=C4=D2=CF=C2=CE= =CF=C5 =D2=C1=DA=DF=D1=D3=CE=C5=CE=C9=C5. =FE=C5=D3-=C7=D2=D1, =CD=C5=CE=D1 =C7=D2=D9=DA=CC=C9 =D3=CF=CD=CE=C5=CE=C9= =D1, =D0=CF=DC=D4=CF=CD=D5 =D1 =D4=D5=D4 =C9 =D7=CF=DA=CE=C9=CB=C1=CC :-)= =D3=CC=C5=C7=CB=C1. =E5=DD=C5 =D2=C1=DA =F7=F3=E5=ED =D3=D0=C1=D3=C9=C2=CF! --=20 Rgrds, jinn.