lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bugs #8864] inet_ntoa doesn't convert string correctly


From: Kieran Mansley
Subject: [lwip-devel] [bugs #8864] inet_ntoa doesn't convert string correctly
Date: Wed, 01 Dec 2004 13:38:29 -0500
User-agent: Opera/7.54 (X11; Linux i686; U) [en]

This mail is an automated notification from the bugs tracker
 of the project: lwIP - A Lightweight TCP/IP stack.

/**************************************************************************/
[bugs #8864] Latest Modifications:

Changes by: 
                Kieran Mansley <address@hidden>
'Date: 
                Wed 12/01/2004 at 18:30 (Europe/London)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | Unreproducible            | Fixed
              Status | Open                      | Closed


------------------ Additional Follow-up Comments ----------------------------
Looks like this has already been fixed in 1.0.0 - the ap variable is already a 
u8_t, which should map to unsigned char on most architectures. 






/**************************************************************************/
[bugs #8864] Full Item Snapshot:

URL: <http://savannah.nongnu.org/bugs/?func=detailitem&item_id=8864>
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: Shawn He
On: Mon 05/10/2004 at 18:20

Category:  IPv4
Severity:  5 - Average
Item Group:  Faulty Behaviour
Resolution:  Fixed
Privacy:  Public
Assigned to:  jani
Status:  Closed


Summary:  inet_ntoa doesn't convert string correctly

Original Submission:  When inet_ntoa converts an ip address s_addr=0xD01E050A 
inside function to a string, the returning string str will be 10.5.30.,( 
instead of 10.5.30.208.

Follow-up Comments
------------------


-------------------------------------------------------
Date: Wed 12/01/2004 at 18:30       By: Kieran Mansley <kieranm>
Looks like this has already been fixed in 1.0.0 - the ap variable is already a 
u8_t, which should map to unsigned char on most architectures. 

-------------------------------------------------------
Date: Wed 12/01/2004 at 17:10       By: Paul RIley <priley>
I have seen and fixed this bug. The reason you can't reproduce it is probably 
due to the choice of IP Address and compiler.

It all depends what type your compiler defaults a char type to, that's 
ambiguous and a good argument for some people no doubt. In the case of our Nios 
compuiler it defaults to signed char. This means that the code in inet_ntoa 
inside the do while loop can have a -ve value and produce the wrong results. 
Making ap an unsigned char* fixes this.

Apologies for not submitting a patch as my changes are quite significant for 
our architecture. Though I will merge those in once 1.1.0 is released.

-------------------------------------------------------
Date: Wed 05/26/2004 at 16:39       By: Shawn He <bluesea>
This occurs on PS2 platform, after I change char *ap back to u8_t *ap, then it 
works fine again. That's all I can say about this bug, I never tested on other 
platforms. -Shawn He

-------------------------------------------------------
Date: Wed 05/26/2004 at 10:40       By: Kieran Mansley <kieranm>
Appears to work OK, awaiting test case from the original bug submitter.












For detailed info, follow this link:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=8864>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/







reply via email to

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