Browse Source

net: fix incorrect sizeof()

v0.7.4-release
Tom Hughes 14 years ago
committed by Ben Noordhuis
parent
commit
a8692a0154
  1. 2
      src/node_net.cc

2
src/node_net.cc

@ -519,7 +519,7 @@ do { \
} else if (addrlen == sizeof(struct sockaddr_un)) { \
/* first byte is '\0' and all remaining bytes are name;
* it is not NUL-terminated and may contain embedded NULs */ \
(info)->Set(address_symbol, String::New(au->sun_path + 1, sizeof(au->sun_path - 1))); \
(info)->Set(address_symbol, String::New(au->sun_path + 1, sizeof(au->sun_path) - 1)); \
} else { \
(info)->Set(address_symbol, String::New(au->sun_path)); \
} \

Loading…
Cancel
Save