diff options
author | Gunnar Beutner <gunnar@beutner.name> | 2021-04-12 16:44:40 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-12 22:44:49 +0200 |
commit | 8fcf91b030ceb17105ce02372c4a57bf49951678 (patch) | |
tree | f052aed18dd229675da692fcf7d64c4bbb45a965 /Userland/Libraries/LibC/netdb.cpp | |
parent | 287a93a2a4de7e7e9e487ee96f3261a669b52b6f (diff) | |
download | serenity-8fcf91b030ceb17105ce02372c4a57bf49951678.zip |
LibC: The port numbers returned by getservby*() should be in network byte order
Diffstat (limited to 'Userland/Libraries/LibC/netdb.cpp')
-rw-r--r-- | Userland/Libraries/LibC/netdb.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibC/netdb.cpp b/Userland/Libraries/LibC/netdb.cpp index 2450d0a0e9..915d96332f 100644 --- a/Userland/Libraries/LibC/netdb.cpp +++ b/Userland/Libraries/LibC/netdb.cpp @@ -342,7 +342,7 @@ struct servent* getservent() return nullptr; __getserv_buffer.s_name = const_cast<char*>(__getserv_name_buffer.characters()); - __getserv_buffer.s_port = __getserv_port_buffer; + __getserv_buffer.s_port = htons(__getserv_port_buffer); __getserv_buffer.s_proto = const_cast<char*>(__getserv_protocol_buffer.characters()); __getserv_alias_list.clear_with_capacity(); |