Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
beef9999 committed Oct 23, 2023
1 parent 7433b64 commit 7e4799a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/kernel_socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,8 @@ LogBuffer& operator<<(LogBuffer& log, const IPAddr addr) {
if (addr.is_ipv4())
return log.printf(addr.a, '.', addr.b, '.', addr.c, '.', addr.d);
else {
assert(log.size >= INET6_ADDRSTRLEN);
if (log.size < INET6_ADDRSTRLEN)
return log;
inet_ntop(AF_INET6, &addr.addr, log.ptr, INET6_ADDRSTRLEN);
log.consume(strlen(log.ptr));
return log;
Expand Down

0 comments on commit 7e4799a

Please sign in to comment.