[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bugs #8864] inet_ntoa doesn't convert string correctly
From: |
Paul RIley |
Subject: |
[lwip-devel] [bugs #8864] inet_ntoa doesn't convert string correctly |
Date: |
Wed, 01 Dec 2004 12:18:32 -0500 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322) |
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:
Paul RIley <address@hidden>
'Date:
Wed 12/01/2004 at 17:10 (GMT)
------------------ Additional Follow-up Comments ----------------------------
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.
/**************************************************************************/
[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: Unreproducible
Privacy: Public
Assigned to: jani
Status: Open
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 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/
- [lwip-devel] [bugs #8864] inet_ntoa doesn't convert string correctly,
Paul RIley <=