You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@thrift.apache.org by GitBox <gi...@apache.org> on 2020/09/09 15:34:06 UTC

[GitHub] [thrift] emmenlau edited a comment on pull request #2235: Fix abstract unix socket name

emmenlau edited a comment on pull request #2235:
URL: https://github.com/apache/thrift/pull/2235#issuecomment-689641015


   > > memcpy(address.sun_path, path_.c_str(), path_.size());
   > 
   > is `memcpy(address.sun_path, path_.c_str(), len)`
   
   I think its better to copy only `path_size()` instead of `len` because it avoids copying a char that is not in the original string.
   
   Zero-termination is (better?) handled by the `memset`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org