Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/xmltooling-3.1.0/xmltooling/exceptions.cpp Examining data/xmltooling-3.1.0/xmltooling/impl/AnyElement.h Examining data/xmltooling-3.1.0/xmltooling/impl/MemoryStorageService.cpp Examining data/xmltooling-3.1.0/xmltooling/impl/UnknownElement.h Examining data/xmltooling-3.1.0/xmltooling/impl/AnyElement.cpp Examining data/xmltooling-3.1.0/xmltooling/impl/UnknownElement.cpp Examining data/xmltooling-3.1.0/xmltooling/encryption/impl/Decrypter.cpp Examining data/xmltooling-3.1.0/xmltooling/encryption/impl/Encrypter.cpp Examining data/xmltooling-3.1.0/xmltooling/encryption/impl/EncryptedKeyResolver.cpp Examining data/xmltooling-3.1.0/xmltooling/encryption/impl/EncryptionImpl.cpp Examining data/xmltooling-3.1.0/xmltooling/encryption/impl/EncryptionSchemaValidators.cpp Examining data/xmltooling-3.1.0/xmltooling/encryption/Decrypter.h Examining data/xmltooling-3.1.0/xmltooling/encryption/Encrypter.h Examining data/xmltooling-3.1.0/xmltooling/encryption/Encryption.h Examining data/xmltooling-3.1.0/xmltooling/encryption/EncryptedKeyResolver.h Examining data/xmltooling-3.1.0/xmltooling/QName.h Examining data/xmltooling-3.1.0/xmltooling/AbstractComplexElement.cpp Examining data/xmltooling-3.1.0/xmltooling/Lockable.cpp Examining data/xmltooling-3.1.0/xmltooling/char_traits.h Examining data/xmltooling-3.1.0/xmltooling/internal.h Examining data/xmltooling-3.1.0/xmltooling/QName.cpp Examining data/xmltooling-3.1.0/xmltooling/version.h Examining data/xmltooling-3.1.0/xmltooling/AbstractXMLObject.cpp Examining data/xmltooling-3.1.0/xmltooling/util/CurlURLInputStream.cpp Examining data/xmltooling-3.1.0/xmltooling/util/CloneInputStream.cpp Examining data/xmltooling-3.1.0/xmltooling/util/StorageService.h Examining data/xmltooling-3.1.0/xmltooling/util/NDC.cpp Examining data/xmltooling-3.1.0/xmltooling/util/URLEncoder.cpp Examining data/xmltooling-3.1.0/xmltooling/util/ReplayCache.h Examining data/xmltooling-3.1.0/xmltooling/util/CurlURLInputStream.h Examining data/xmltooling-3.1.0/xmltooling/util/ReloadableXMLFile.cpp Examining data/xmltooling-3.1.0/xmltooling/util/XMLHelper.cpp Examining data/xmltooling-3.1.0/xmltooling/util/XMLConstants.h Examining data/xmltooling-3.1.0/xmltooling/util/PathResolver.h Examining data/xmltooling-3.1.0/xmltooling/util/ParserPool.cpp Examining data/xmltooling-3.1.0/xmltooling/util/Threads.h Examining data/xmltooling-3.1.0/xmltooling/util/XMLHelper.h Examining data/xmltooling-3.1.0/xmltooling/util/StorageService.cpp Examining data/xmltooling-3.1.0/xmltooling/util/DirectoryWalker.cpp Examining data/xmltooling-3.1.0/xmltooling/util/ParserPool.h Examining data/xmltooling-3.1.0/xmltooling/util/URLEncoder.h Examining data/xmltooling-3.1.0/xmltooling/util/PathResolver.cpp Examining data/xmltooling-3.1.0/xmltooling/util/ReloadableXMLFile.h Examining data/xmltooling-3.1.0/xmltooling/util/CloneInputStream.h Examining data/xmltooling-3.1.0/xmltooling/util/XMLObjectChildrenList.h Examining data/xmltooling-3.1.0/xmltooling/util/TemplateEngine.cpp Examining data/xmltooling-3.1.0/xmltooling/util/PThreads.cpp Examining data/xmltooling-3.1.0/xmltooling/util/Predicates.h Examining data/xmltooling-3.1.0/xmltooling/util/TemplateEngine.h Examining data/xmltooling-3.1.0/xmltooling/util/DirectoryWalker.h Examining data/xmltooling-3.1.0/xmltooling/util/XMLConstants.cpp Examining data/xmltooling-3.1.0/xmltooling/util/NDC.h Examining data/xmltooling-3.1.0/xmltooling/util/Win32Threads.cpp Examining data/xmltooling-3.1.0/xmltooling/util/ReplayCache.cpp Examining data/xmltooling-3.1.0/xmltooling/signature/Signature.h Examining data/xmltooling-3.1.0/xmltooling/signature/impl/XMLSecSignatureImpl.cpp Examining data/xmltooling-3.1.0/xmltooling/signature/impl/SignatureValidator.cpp Examining data/xmltooling-3.1.0/xmltooling/signature/impl/KeyInfoImpl.cpp Examining data/xmltooling-3.1.0/xmltooling/signature/impl/KeyInfoSchemaValidators.cpp Examining data/xmltooling-3.1.0/xmltooling/signature/ContentReference.h Examining data/xmltooling-3.1.0/xmltooling/signature/KeyInfo.h Examining data/xmltooling-3.1.0/xmltooling/signature/SignatureValidator.h Examining data/xmltooling-3.1.0/xmltooling/XMLToolingConfig.cpp Examining data/xmltooling-3.1.0/xmltooling/security/KeyInfoResolver.h Examining data/xmltooling-3.1.0/xmltooling/security/KeyInfoCredentialContext.h Examining data/xmltooling-3.1.0/xmltooling/security/impl/ChainingTrustEngine.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/FilesystemCredentialResolver.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/CredentialCriteria.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/InlineKeyResolver.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/ChainingCredentialResolver.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/KeyInfoResolver.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/PKIXPathValidator.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/AbstractPKIXTrustEngine.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/StaticPKIXTrustEngine.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/CredentialResolver.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/OpenSSLSupport.h Examining data/xmltooling-3.1.0/xmltooling/security/impl/BasicX509Credential.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/DummyCredentialResolver.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/SecurityHelper.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/DataSealer.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/OpenSSLSupport.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/VersionedDataSealerKeyStrategy.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/StaticDataSealerKeyStrategy.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/XSECCryptoX509CRL.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/ManagedResource.h Examining data/xmltooling-3.1.0/xmltooling/security/impl/ExplicitKeyTrustEngine.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/TrustEngine.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/OpenSSLCryptoX509CRL.cpp Examining data/xmltooling-3.1.0/xmltooling/security/impl/OpenSSLSecurityHelper.cpp Examining data/xmltooling-3.1.0/xmltooling/security/PathValidator.h Examining data/xmltooling-3.1.0/xmltooling/security/X509Credential.h Examining data/xmltooling-3.1.0/xmltooling/security/AbstractPKIXTrustEngine.h Examining data/xmltooling-3.1.0/xmltooling/security/OpenSSLPathValidator.h Examining data/xmltooling-3.1.0/xmltooling/security/OpenSSLTrustEngine.h Examining data/xmltooling-3.1.0/xmltooling/security/PKIXPathValidatorParams.h Examining data/xmltooling-3.1.0/xmltooling/security/ChainingTrustEngine.h Examining data/xmltooling-3.1.0/xmltooling/security/CredentialCriteria.h Examining data/xmltooling-3.1.0/xmltooling/security/BasicX509Credential.h Examining data/xmltooling-3.1.0/xmltooling/security/SignatureTrustEngine.h Examining data/xmltooling-3.1.0/xmltooling/security/XSECCryptoX509CRL.h Examining data/xmltooling-3.1.0/xmltooling/security/CredentialContext.h Examining data/xmltooling-3.1.0/xmltooling/security/OpenSSLCryptoX509CRL.h Examining data/xmltooling-3.1.0/xmltooling/security/CredentialResolver.h Examining data/xmltooling-3.1.0/xmltooling/security/SecurityHelper.h Examining data/xmltooling-3.1.0/xmltooling/security/DataSealer.h Examining data/xmltooling-3.1.0/xmltooling/security/OpenSSLSecurityHelper.h Examining data/xmltooling-3.1.0/xmltooling/security/OpenSSLCredential.h Examining data/xmltooling-3.1.0/xmltooling/security/TrustEngine.h Examining data/xmltooling-3.1.0/xmltooling/security/Credential.h Examining data/xmltooling-3.1.0/xmltooling/security/X509TrustEngine.h Examining data/xmltooling-3.1.0/xmltooling/version.cpp Examining data/xmltooling-3.1.0/xmltooling/ConcreteXMLObjectBuilder.h Examining data/xmltooling-3.1.0/xmltooling/exceptions.h Examining data/xmltooling-3.1.0/xmltooling/io/AbstractXMLObjectUnmarshaller.cpp Examining data/xmltooling-3.1.0/xmltooling/io/AbstractXMLObjectUnmarshaller.h Examining data/xmltooling-3.1.0/xmltooling/io/AbstractXMLObjectMarshaller.h Examining data/xmltooling-3.1.0/xmltooling/io/AbstractXMLObjectMarshaller.cpp Examining data/xmltooling-3.1.0/xmltooling/io/GenericRequest.h Examining data/xmltooling-3.1.0/xmltooling/io/HTTPResponse.cpp Examining data/xmltooling-3.1.0/xmltooling/io/HTTPResponse.h Examining data/xmltooling-3.1.0/xmltooling/io/HTTPRequest.h Examining data/xmltooling-3.1.0/xmltooling/io/GenericResponse.h Examining data/xmltooling-3.1.0/xmltooling/io/HTTPRequest.cpp Examining data/xmltooling-3.1.0/xmltooling/AbstractDOMCachingXMLObject.cpp Examining data/xmltooling-3.1.0/xmltooling/Namespace.h Examining data/xmltooling-3.1.0/xmltooling/AbstractSimpleElement.cpp Examining data/xmltooling-3.1.0/xmltooling/logging.h Examining data/xmltooling-3.1.0/xmltooling/Namespace.cpp Examining data/xmltooling-3.1.0/xmltooling/XMLObjectBuilder.cpp Examining data/xmltooling-3.1.0/xmltooling/soap/impl/SOAPClient.cpp Examining data/xmltooling-3.1.0/xmltooling/soap/impl/SOAPImpl.cpp Examining data/xmltooling-3.1.0/xmltooling/soap/impl/SOAPSchemaValidators.cpp Examining data/xmltooling-3.1.0/xmltooling/soap/impl/CURLSOAPTransport.cpp Examining data/xmltooling-3.1.0/xmltooling/soap/SOAPClient.h Examining data/xmltooling-3.1.0/xmltooling/soap/SOAP.h Examining data/xmltooling-3.1.0/xmltooling/soap/HTTPSOAPTransport.h Examining data/xmltooling-3.1.0/xmltooling/soap/SOAPTransport.h Examining data/xmltooling-3.1.0/xmltooling/soap/OpenSSLSOAPTransport.h Examining data/xmltooling-3.1.0/xmltooling/ElementProxy.h Examining data/xmltooling-3.1.0/xmltooling/XMLToolingConfig.h Examining data/xmltooling-3.1.0/xmltooling/XMLObjectBuilder.h Examining data/xmltooling-3.1.0/xmltooling/unicode.h Examining data/xmltooling-3.1.0/xmltooling/AbstractAttributeExtensibleXMLObject.cpp Examining data/xmltooling-3.1.0/xmltooling/ElementExtensibleXMLObject.h Examining data/xmltooling-3.1.0/xmltooling/AbstractXMLObject.h Examining data/xmltooling-3.1.0/xmltooling/AbstractDOMCachingXMLObject.h Examining data/xmltooling-3.1.0/xmltooling/resource.h Examining data/xmltooling-3.1.0/xmltooling/AbstractAttributeExtensibleXMLObject.h Examining data/xmltooling-3.1.0/xmltooling/PluginManager.h Examining data/xmltooling-3.1.0/xmltooling/AttributeExtensibleXMLObject.h Examining data/xmltooling-3.1.0/xmltooling/AbstractComplexElement.h Examining data/xmltooling-3.1.0/xmltooling/XMLObject.h Examining data/xmltooling-3.1.0/xmltooling/AbstractSimpleElement.h Examining data/xmltooling-3.1.0/xmltooling/config_pub_win32.h Examining data/xmltooling-3.1.0/xmltooling/Lockable.h Examining data/xmltooling-3.1.0/xmltooling/unicode.cpp Examining data/xmltooling-3.1.0/xmltooling/validation/Validator.h Examining data/xmltooling-3.1.0/xmltooling/validation/ValidatorSuite.h Examining data/xmltooling-3.1.0/xmltooling/validation/ValidatorSuite.cpp Examining data/xmltooling-3.1.0/xmltooling/base.h Examining data/xmltooling-3.1.0/xmltoolingtest/DataSealerTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/CloneInputStreamTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/BadKeyInfoTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/SecurityHelperTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/InlineKeyResolverTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/ExceptionTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/SignatureTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/KeyInfoTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/FilesystemCredentialResolverTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/DirectoryWalkerTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/SOAPTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/UnmarshallingTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/XMLObjectBaseTestCase.h Examining data/xmltooling-3.1.0/xmltoolingtest/PKIXEngineTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/EncryptionTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/TemplateEngineTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/MarshallingTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/xmltoolingtest.h Examining data/xmltooling-3.1.0/xmltoolingtest/ExplicitKeyTrustEngineTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/ComplexXMLObjectTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/DateTimeTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/NonVisibleNamespaceTest.h Examining data/xmltooling-3.1.0/xmltoolingtest/MemoryStorageServiceTest.h Examining data/xmltooling-3.1.0/config_win32.h FINAL RESULTS: data/xmltooling-3.1.0/xmltooling/security/impl/FilesystemCredentialResolver.cpp:622:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf,reinterpret_cast<char*>(passwd)); data/xmltooling-3.1.0/xmltooling/security/impl/SecurityHelper.cpp:61:13: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(buf,reinterpret_cast<char*>(passwd)); data/xmltooling-3.1.0/xmltooling/util/ParserPool.cpp:262:24: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. static const XMLCh system[] = UNICODE_LITERAL_6(s,y,s,t,e,m); data/xmltooling-3.1.0/xmltooling/util/ParserPool.cpp:298:73: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. DOMNodeList* mappings = root->getElementsByTagNameNS(CATALOG_NS,system); data/xmltooling-3.1.0/xmltooling/XMLToolingConfig.cpp:289:20: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. config=getenv("XMLTOOLING_LOG_CONFIG"); data/xmltooling-3.1.0/xmltooling/XMLToolingConfig.cpp:606:16: [3] (misc) LoadLibraryEx: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. handle=LoadLibraryEx(resolved.c_str(),nullptr,LOAD_WITH_ALTERED_SEARCH_PATH); data/xmltooling-3.1.0/xmltooling/XMLToolingConfig.cpp:608:21: [3] (misc) LoadLibraryEx: Ensure that the full path to the library is specified, or current directory may be used (CWE-829, CWE-20). Use registry entry or GetWindowsDirectory to find library path, if you aren't already. handle=LoadLibraryEx(resolved.c_str(),nullptr,0); data/xmltooling-3.1.0/xmltooling/util/ParserPool.cpp:111:23: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char* env = getenv("XMLTOOLING_ENTITY_EXPANSION_LIMIT"); data/xmltooling-3.1.0/xmltooling/util/PathResolver.cpp:112:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROGRAMDATA") && s.find("%PROGRAMDATA%") != string::npos) { data/xmltooling-3.1.0/xmltooling/util/Win32Threads.cpp:65:13: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&cs); data/xmltooling-3.1.0/xmltooling/util/Win32Threads.cpp:78:13: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&cse.cs); data/xmltooling-3.1.0/xmltooling/util/Win32Threads.cpp:158:13: [3] (misc) InitializeCriticalSection: Exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. InitializeCriticalSection(&mhandle); data/xmltooling-3.1.0/xmltooling/util/Win32Threads.cpp:166:13: [3] (misc) EnterCriticalSection: On some versions of Windows, exceptions can be thrown in low-memory situations. Use InitializeCriticalSectionAndSpinCount instead. EnterCriticalSection(&mhandle); data/xmltooling-3.1.0/xmltoolingtest/SecurityHelperTest.h:38:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XMLTOOLINGTEST_SKIP_NETWORKED")) { data/xmltooling-3.1.0/xmltoolingtest/xmltoolingtest.h:42:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("XMLTOOLINGTEST_DATA")) data/xmltooling-3.1.0/xmltoolingtest/xmltoolingtest.h:43:35: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. data_path=std::string(getenv("XMLTOOLINGTEST_DATA")) + "/"; data/xmltooling-3.1.0/xmltooling/encryption/Encrypter.h:230:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char m_keyBuffer[32]; data/xmltooling-3.1.0/xmltooling/io/HTTPResponse.cpp:110:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cookietimebuf[64]; data/xmltooling-3.1.0/xmltooling/security/impl/AbstractPKIXTrustEngine.cpp:303:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(peer_CN, ASN1_STRING_data(tmp), j); data/xmltooling-3.1.0/xmltooling/security/impl/BasicX509Credential.cpp:433:21: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(peer_CN, ASN1_STRING_data(tmp), j); data/xmltooling-3.1.0/xmltooling/security/impl/DataSealer.cpp:122:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char timebuf[32]; data/xmltooling-3.1.0/xmltooling/security/impl/OpenSSLCryptoX509CRL.cpp:71:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/xmltooling-3.1.0/xmltooling/security/impl/SecurityHelper.cpp:74:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[READSIZE]; data/xmltooling-3.1.0/xmltooling/security/impl/SecurityHelper.cpp:134:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[READSIZE]; data/xmltooling-3.1.0/xmltooling/security/impl/SecurityHelper.cpp:249:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[READSIZE]; data/xmltooling-3.1.0/xmltooling/security/impl/SecurityHelper.cpp:354:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[READSIZE]; data/xmltooling-3.1.0/xmltooling/security/impl/SecurityHelper.cpp:525:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char digest[EVP_MAX_MD_SIZE]; data/xmltooling-3.1.0/xmltooling/security/impl/SecurityHelper.cpp:622:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char digest[EVP_MAX_MD_SIZE]; data/xmltooling-3.1.0/xmltooling/security/impl/SecurityHelper.cpp:679:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char digest[EVP_MAX_MD_SIZE]; data/xmltooling-3.1.0/xmltooling/security/impl/XSECCryptoX509CRL.cpp:51:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(b1, buf, len); data/xmltooling-3.1.0/xmltooling/soap/impl/CURLSOAPTransport.cpp:527:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/xmltooling-3.1.0/xmltooling/soap/impl/CURLSOAPTransport.cpp:543:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char curl_errorbuf[CURL_ERROR_SIZE]; data/xmltooling-3.1.0/xmltooling/soap/impl/CURLSOAPTransport.cpp:641:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf,ptr,nmemb); data/xmltooling-3.1.0/xmltooling/util/CurlURLInputStream.cpp:423:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fBuffer, specialxml.c_str(), specialxml.length()); data/xmltooling-3.1.0/xmltooling/util/CurlURLInputStream.cpp:450:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fWritePtr, buffer, consume); data/xmltooling-3.1.0/xmltooling/util/CurlURLInputStream.cpp:475:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fBufferHeadPtr, buffer, cnt); data/xmltooling-3.1.0/xmltooling/util/CurlURLInputStream.cpp:590:13: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fWritePtr, fBufferTailPtr, bufCnt); data/xmltooling-3.1.0/xmltooling/util/CurlURLInputStream.h:137:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fError[CURL_ERROR_SIZE]; data/xmltooling-3.1.0/xmltooling/util/DirectoryWalker.cpp:110:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dir_buf[sizeof(struct dirent) + PATH_MAX]; data/xmltooling-3.1.0/xmltooling/util/PThreads.cpp:206:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/xmltooling-3.1.0/xmltooling/util/PThreads.cpp:222:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/xmltooling-3.1.0/xmltooling/util/PThreads.cpp:238:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/xmltooling-3.1.0/xmltooling/util/PThreads.cpp:258:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/xmltooling-3.1.0/xmltooling/util/PThreads.cpp:274:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/xmltooling-3.1.0/xmltooling/util/ParserPool.cpp:113:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). expLimit = atoi(env); data/xmltooling-3.1.0/xmltooling/util/PathResolver.cpp:113:13: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char appdatapath[MAX_PATH + 2]; data/xmltooling-3.1.0/xmltooling/util/PathResolver.cpp:118:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char expbuf[MAX_PATH + 2]; data/xmltooling-3.1.0/xmltooling/util/ReloadableXMLFile.cpp:198:27: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE* cfile = fopen(m_source.c_str(), "r"); data/xmltooling-3.1.0/xmltooling/util/ReloadableXMLFile.cpp:215:25: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cachebuf[256]; data/xmltooling-3.1.0/xmltoolingtest/BadKeyInfoTest.h:61:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char m_toSign[23]; data/xmltooling-3.1.0/xmltoolingtest/BadKeyInfoTest.h:62:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m_outSigDSA[SIGBUFFER_SIZE]; data/xmltooling-3.1.0/xmltoolingtest/BadKeyInfoTest.h:63:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m_outSigEC[SIGBUFFER_SIZE]; data/xmltooling-3.1.0/xmltoolingtest/BadKeyInfoTest.h:83:9: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy((char*)m_toSign, "Nibble A Happy WartHog"); data/xmltooling-3.1.0/xmltoolingtest/DataSealerTest.h:34:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char keybuf[32]; data/xmltooling-3.1.0/xmltoolingtest/InlineKeyResolverTest.h:116:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outSig[bufferSize] = {0}; data/xmltooling-3.1.0/xmltoolingtest/InlineKeyResolverTest.h:157:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outSig[bufferSize] = {0}; data/xmltooling-3.1.0/xmltoolingtest/SignatureTest.h:121:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outSig[bufferSize] = {0}; data/xmltooling-3.1.0/xmltoolingtest/SignatureTest.h:145:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outSig[bufferSize] = {0}; data/xmltooling-3.1.0/xmltoolingtest/SignatureTest.h:167:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char outSig[bufferSize] = {0}; data/xmltooling-3.1.0/xmltooling/security/impl/FilesystemCredentialResolver.cpp:620:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(passwd && len > strlen(reinterpret_cast<char*>(passwd))) data/xmltooling-3.1.0/xmltooling/security/impl/FilesystemCredentialResolver.cpp:623:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(buf); data/xmltooling-3.1.0/xmltooling/security/impl/InlineKeyResolver.cpp:273:64: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rsa->loadPublicModulusBase64BigNums(mod.get(), strlen(mod.get())); data/xmltooling-3.1.0/xmltooling/security/impl/InlineKeyResolver.cpp:274:65: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). rsa->loadPublicExponentBase64BigNums(exp.get(), strlen(exp.get())); data/xmltooling-3.1.0/xmltooling/security/impl/InlineKeyResolver.cpp:283:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dsa->loadYBase64BigNums(y.get(), strlen(y.get())); data/xmltooling-3.1.0/xmltooling/security/impl/InlineKeyResolver.cpp:286:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dsa->loadPBase64BigNums(p.get(), strlen(p.get())); data/xmltooling-3.1.0/xmltooling/security/impl/InlineKeyResolver.cpp:290:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dsa->loadQBase64BigNums(q.get(), strlen(q.get())); data/xmltooling-3.1.0/xmltooling/security/impl/InlineKeyResolver.cpp:294:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). dsa->loadGBase64BigNums(g.get(), strlen(g.get())); data/xmltooling-3.1.0/xmltooling/security/impl/InlineKeyResolver.cpp:388:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). x509->loadX509Base64Bin(x.get(), strlen(x.get())); data/xmltooling-3.1.0/xmltooling/security/impl/InlineKeyResolver.cpp:452:56: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). crl->loadX509CRLBase64Bin(x.get(), strlen(x.get())); data/xmltooling-3.1.0/xmltooling/security/impl/InlineKeyResolver.cpp:547:69: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). crlobj->loadX509CRLBase64Bin(buf.get(), strlen(buf.get())); data/xmltooling-3.1.0/xmltooling/security/impl/PKIXPathValidator.cpp:465:61: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). string cdpfile = SecurityHelper::doHash("SHA1", cdpuri, strlen(cdpuri)) + ".crl"; data/xmltooling-3.1.0/xmltooling/security/impl/SecurityHelper.cpp:59:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(passwd && len > strlen(reinterpret_cast<char*>(passwd))) data/xmltooling-3.1.0/xmltooling/security/impl/SecurityHelper.cpp:62:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(buf); data/xmltooling-3.1.0/xmltooling/security/impl/XSECCryptoX509CRL.cpp:68:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen("-----BEGIN X509 CRL-----"); data/xmltooling-3.1.0/xmltooling/soap/impl/CURLSOAPTransport.cpp:529:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). in->read(buf,1024); data/xmltooling-3.1.0/xmltooling/soap/impl/CURLSOAPTransport.cpp:663:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). buf->read(reinterpret_cast<char*>(ptr),size*nmemb); data/xmltooling-3.1.0/xmltooling/unicode.cpp:73:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). XMLSize_t srclen=strlen(src); data/xmltooling-3.1.0/xmltooling/util/ParserPool.cpp:449:18: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). m_is.read(reinterpret_cast<char* const>(target),request); data/xmltooling-3.1.0/xmltooling/util/ReplayCache.cpp:51:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(context) > m_storageCaps.getContextSize()) { data/xmltooling-3.1.0/xmltooling/util/ReplayCache.cpp:58:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). else if (strlen(s) > m_storageCaps.getKeySize()) { data/xmltooling-3.1.0/xmltooling/util/ReplayCache.cpp:61:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). string h = SecurityHelper::doHash("SHA1", s, strlen(s)); ANALYSIS SUMMARY: Hits = 81 Lines analyzed = 38941 in approximately 1.10 seconds (35561 lines/second) Physical Source Lines of Code (SLOC) = 23235 Hits@level = [0] 1 [1] 22 [2] 43 [3] 12 [4] 4 [5] 0 Hits@level+ = [0+] 82 [1+] 81 [2+] 59 [3+] 16 [4+] 4 [5+] 0 Hits/KSLOC@level+ = [0+] 3.52916 [1+] 3.48612 [2+] 2.53927 [3+] 0.688616 [4+] 0.172154 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.