lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] possible bug?


From: Kieran Mansley
Subject: Re: [lwip-users] possible bug?
Date: Wed, 17 Jun 2009 15:50:04 +0100

On Wed, 2009-06-17 at 16:41 +0200, Jesper Vestergaard wrote:  
> I use strstr to search in it:
> 
> if (strstr(pcRxString, cSearchString) != NULL )
>     controlLED(led,LED_ON);
> 
> which have the same problem. So guess it's the avr32 toolchain that is 
> causing the problem.

Not quite - the toolchain is probably fine.  The problem is you're
trying to use string functions like printf and strstr on something that
is not a NULL-terminated string.  If you want to use those functions,
you'll have to NULL-terminate the data given to you by lwIP before you
do, as they rely on the NULL-termination to work out the length of the
string.  

Kieran





reply via email to

[Prev in Thread] Current Thread [Next in Thread]