Endian bug in KNetwork::KIpAddress

Thiago Macieira thiago at kde.org
Sat Jul 22 14:18:25 BST 2006


Nadeem Hasan wrote:
>On Saturday 22 July 2006 04:50, you wrote:
>> Calling ntohl should be preferred in the isClass* functions, since it
>> wouldn't change the address data, that other sections of code must be
>> using already.
>>
>> I have no development environment here either. I cannot do any
>> changes.
>
>Ok...I have a near blind patch attached. It compiles, but I cannot
> verify that it actually works (though it should). I would really like
> this fix to get into 3.5.4 so If someone can give me a green light, I
> will commit.

Please don't #include <arpa/inet.h> in the public header.

Add a new function that returns the ntohl of the IPv4 address and call 
ntohl from it.
-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060722/581d8b7b/attachment.sig>


More information about the kde-core-devel mailing list