delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/02/19/09:54:53

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Tue, 19 Feb 2002 14:15:55 +0100
From: Kurt Roeckx <Q AT ping DOT be>
To: Pavel Tsekov <ptsekov AT syntrex DOT com>
Cc: cygwin AT cygwin DOT com
Subject: Re: Fwd: Re: Core dumped just only with strcat!
Message-ID: <20020219141555.B1286@ping.be>
References: <2110666337 DOT 20020219124535 AT syntrex DOT com> <20020219141438 DOT A1286 AT ping DOT be>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <20020219141438.A1286@ping.be>; from Q@ping.be on Tue, Feb 19, 2002 at 02:14:38PM +0100

On Tue, Feb 19, 2002 at 02:14:38PM +0100, Kurt Roeckx wrote:
> On Tue, Feb 19, 2002 at 12:45:35PM +0100, Pavel Tsekov wrote:
> > I've trying lots of things and after 1 day with it, I've achieved to work
> > part of the code. What I did? I just declared my array before a MYSQL_RES
> > variable. I had:
> > 
> > MYSQL_RES * result;
> > char petition[500];
> 
> This is basic C knowledge.  Here petition is a local variable, so
> it's not filled with '\0'.  You either want to place a '\0' in
> petition[0], or use strcpy() instead of strcat().

Oops, you did the first one.  I should have looked at the code
closer.


Kurt


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019