This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: Re: Core dumped just only with strcat!


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]