Skip to content

Commit 2d34a25

Browse files
committed
Add a comment about the logic in gethostbyname
1 parent 1e805ee commit 2d34a25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/truffle/socket/socket.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def self.gethostbyname(hostname)
138138
addrinfos.each do |a|
139139
sockaddr = Socket.sockaddr_in(0, a[3])
140140

141-
141+
# Done manually because we want to read the full address as a String, even if it contains nul bytes
142142
if a[4] == AF_INET
143143
offset = Truffle::Config['platform.sockaddr_in.sin_addr.offset']
144144
size = Truffle::Config['platform.sockaddr_in.sin_addr.size']

0 commit comments

Comments
 (0)