Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char *strsncpy (char *dst,
- const char *src,
- size_t maxlen);
- class ACE_Export ACE_Name_Request
- {
- ...
- /// Pointer to the beginning of the type in this->data_;
- char *type_;
- };
- void
- ACE_Name_Request::type (const char *c)
- {
- ACE_TRACE ("ACE_Name_Request::type");
- ACE_OS::strsncpy (this->type_,
- c,
- sizeof this->type_);
- }
- This suspicious code was found in ACE project by PVS-Studio static code analyzer.
- Warning message is:
- V579 The strsncpy function receives the pointer and its size as arguments. It is possibly a mistake. Inspect the third argument. ACE name_request_reply.cpp 251
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment