Github user dgkimura commented on a diff in the pull request:

    https://github.com/apache/geode-native/pull/3#discussion_r100938599
  
    --- Diff: src/cppcache/src/CacheXmlParser.cpp ---
    @@ -1165,7 +1166,7 @@ void CacheXmlParser::startPersistenceManager(const 
xmlChar** atts) {
             throw CacheXmlException(s.c_str());
           }
     
    -      ACE_OS::strncpy(libraryFunctionName, (char*)atts[i], len);
    +      std::strncpy(libraryFunctionName, (char*)atts[i], len);
    --- End diff --
    
    Okay, so `xmlChar` is an `unsigned char` and `strncpy ` requires a `char`, 
hence a c-style cast/hack here.  That seems broken.  A fix may be using 
`std::memcpy`.  However, other calls, like `strlen` seem fundamentally broken.  
I think fixing these calls may be out of scope for this PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to