From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30398 invoked by alias); 28 Dec 2004 01:34:35 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 30386 invoked by uid 48); 28 Dec 2004 01:34:33 -0000 Date: Tue, 28 Dec 2004 01:34:00 -0000 Message-ID: <20041228013433.30385.qmail@sourceware.org> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041228000900.19172.rolosworld@gmail.com> References: <20041228000900.19172.rolosworld@gmail.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/19172] strcpy bug? or mine? X-Bugzilla-Reason: CC X-SW-Source: 2004-12/txt/msg03695.txt.bz2 List-Id: ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-28 01:34 ------- That is the bug: word = new char( strlen(str) +1); should be: word = new char[ strlen(str) +1]; Otherwise you are allocating only one char. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19172