Message-ID: <87BC54A997CCD01198930020AFF6011C2BA6BE@mail.rkk.cz> From: "Holejsovsky, Pavel" To: "'Alexander Bokovoy'" Cc: "'djgpp AT delorie DOT com'" Subject: RE: SIGSEGV or SIGABRT during execution Date: Thu, 21 Aug 1997 17:03:31 +0200 MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk you must say: KeyWord = new char[strlen(keyword)+1] because strlen returns length of string without terminating '\0' character. Generally, strcpy(new char[strlen(x)], x) will cause memory corruption (one byte after allocated char array). If you say that first constructor passes OK and 2nd breaks, then it may be the cause - during first ctor you damage internal heap management flags used by operator new and it blows up on second call. Pavel P.S. Sorry about not quoting your mail, but either this stuuupiiid M$ mailer is totally broken, or I'm much more stupid and I can't use it. grrrr....