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/orthanc-gdcm-1.1/Plugin/GdcmDecoderCache.cpp Examining data/orthanc-gdcm-1.1/Plugin/GdcmDecoderCache.h Examining data/orthanc-gdcm-1.1/Plugin/GdcmImageDecoder.cpp Examining data/orthanc-gdcm-1.1/Plugin/GdcmImageDecoder.h Examining data/orthanc-gdcm-1.1/Plugin/Plugin.cpp Examining data/orthanc-gdcm-1.1/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp Examining data/orthanc-gdcm-1.1/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h Examining data/orthanc-gdcm-1.1/Resources/Orthanc/Plugins/OrthancPluginException.h Examining data/orthanc-gdcm-1.1/Resources/Orthanc/Sdk-0.9.5/orthanc/OrthancCPlugin.h Examining data/orthanc-gdcm-1.1/Resources/Orthanc/Sdk-1.7.0/orthanc/OrthancCPlugin.h FINAL RESULTS: data/orthanc-gdcm-1.1/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp:1431:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf data/orthanc-gdcm-1.1/Resources/Orthanc/Sdk-0.9.5/orthanc/OrthancCPlugin.h:1050:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf data/orthanc-gdcm-1.1/Resources/Orthanc/Sdk-1.7.0/orthanc/OrthancCPlugin.h:1782:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf data/orthanc-gdcm-1.1/Plugin/GdcmImageDecoder.cpp:385:7: [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(target.GetBuffer(), sourceBuffer, decoded.size()); data/orthanc-gdcm-1.1/Plugin/GdcmImageDecoder.cpp:398: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(b, a, sourcePitch); data/orthanc-gdcm-1.1/Plugin/Plugin.cpp:79: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 tmp[16]; data/orthanc-gdcm-1.1/Plugin/Plugin.cpp:80:5: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(tmp, "%0.1fMB", static_cast<float>(size) / (1024.0f * 1024.0f)); data/orthanc-gdcm-1.1/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp:137:7: [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(buffer_.data, buffer, size); data/orthanc-gdcm-1.1/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp:2637: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(&target[pos], (*it)->c_str(), s); data/orthanc-gdcm-1.1/Resources/Orthanc/Sdk-0.9.5/orthanc/OrthancCPlugin.h:2247:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). OrthancPluginStorageRead read; data/orthanc-gdcm-1.1/Resources/Orthanc/Sdk-0.9.5/orthanc/OrthancCPlugin.h:2269:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). OrthancPluginStorageRead read, data/orthanc-gdcm-1.1/Resources/Orthanc/Sdk-0.9.5/orthanc/OrthancCPlugin.h:2274:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). params.read = read; data/orthanc-gdcm-1.1/Resources/Orthanc/Sdk-1.7.0/orthanc/OrthancCPlugin.h:3028:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). OrthancPluginStorageRead read; data/orthanc-gdcm-1.1/Resources/Orthanc/Sdk-1.7.0/orthanc/OrthancCPlugin.h:3050:33: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). OrthancPluginStorageRead read, data/orthanc-gdcm-1.1/Resources/Orthanc/Sdk-1.7.0/orthanc/OrthancCPlugin.h:3055:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). params.read = read; ANALYSIS SUMMARY: Hits = 15 Lines analyzed = 18739 in approximately 0.44 seconds (42512 lines/second) Physical Source Lines of Code (SLOC) = 10687 Hits@level = [0] 0 [1] 6 [2] 6 [3] 0 [4] 3 [5] 0 Hits@level+ = [0+] 15 [1+] 15 [2+] 9 [3+] 3 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 1.40357 [1+] 1.40357 [2+] 0.842145 [3+] 0.280715 [4+] 0.280715 [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.