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-python-2.0+ds/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.cpp
Examining data/orthanc-python-2.0+ds/Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h
Examining data/orthanc-python-2.0+ds/Resources/Orthanc/Plugins/OrthancPluginException.h
Examining data/orthanc-python-2.0+ds/Resources/Orthanc/Sdk-1.7.2/orthanc/OrthancCPlugin.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk.cpp
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_GlobalFunctions.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginChangeType.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginCompressionType.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginConstraintType.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginContentType.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginCreateDicomFlags.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginDicomInstance.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFlags.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginDicomToJsonFormat.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginDicomWebBinaryMode.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginDicomWebNode.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginErrorCode.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginFindAnswers.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginFindMatcher.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginFindQuery.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginHttpMethod.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginIdentifierConstraint.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginImage.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginImageFormat.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginInstanceOrigin.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginJob.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginJobStepStatus.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginJobStopReason.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginMetricsType.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginPeers.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginPixelFormat.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginResourceType.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginRestOutput.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginServerChunkedRequestReader.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginStorageArea.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginStorageCommitmentFailureReason.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginValueRepresentation.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginWorklistAnswers.impl.h
Examining data/orthanc-python-2.0+ds/Sources/Autogenerated/sdk_OrthancPluginWorklistQuery.impl.h
Examining data/orthanc-python-2.0+ds/Sources/OnChangeCallback.cpp
Examining data/orthanc-python-2.0+ds/Sources/OnChangeCallback.h
Examining data/orthanc-python-2.0+ds/Sources/OnStoredInstanceCallback.cpp
Examining data/orthanc-python-2.0+ds/Sources/OnStoredInstanceCallback.h
Examining data/orthanc-python-2.0+ds/Sources/Plugin.cpp
Examining data/orthanc-python-2.0+ds/Sources/PythonFunction.cpp
Examining data/orthanc-python-2.0+ds/Sources/PythonFunction.h
Examining data/orthanc-python-2.0+ds/Sources/PythonHeaderWrapper.h
Examining data/orthanc-python-2.0+ds/Sources/PythonLock.cpp
Examining data/orthanc-python-2.0+ds/Sources/PythonLock.h
Examining data/orthanc-python-2.0+ds/Sources/PythonModule.cpp
Examining data/orthanc-python-2.0+ds/Sources/PythonModule.h
Examining data/orthanc-python-2.0+ds/Sources/PythonObject.cpp
Examining data/orthanc-python-2.0+ds/Sources/PythonObject.h
Examining data/orthanc-python-2.0+ds/Sources/PythonString.cpp
Examining data/orthanc-python-2.0+ds/Sources/PythonString.h
Examining data/orthanc-python-2.0+ds/Sources/RestCallbacks.cpp
Examining data/orthanc-python-2.0+ds/Sources/RestCallbacks.h

FINAL RESULTS:

data/orthanc-python-2.0+ds/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-python-2.0+ds/Resources/Orthanc/Sdk-1.7.2/orthanc/OrthancCPlugin.h:1773: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-python-2.0+ds/Sources/Plugin.cpp:169:7:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
      sprintf(info, "Your version of Orthanc (%s) must be above %d.%d.%d to run this plugin",
data/orthanc-python-2.0+ds/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-python-2.0+ds/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-python-2.0+ds/Sources/Plugin.cpp:168:7:  [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 info[1024];
data/orthanc-python-2.0+ds/Resources/Orthanc/Sdk-1.7.2/orthanc/OrthancCPlugin.h:3019:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    OrthancPluginStorageRead    read;
data/orthanc-python-2.0+ds/Resources/Orthanc/Sdk-1.7.2/orthanc/OrthancCPlugin.h:3041:33:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    OrthancPluginStorageRead    read,
data/orthanc-python-2.0+ds/Resources/Orthanc/Sdk-1.7.2/orthanc/OrthancCPlugin.h:3046: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 = 9
Lines analyzed = 21987 in approximately 0.52 seconds (42133 lines/second)
Physical Source Lines of Code (SLOC) = 13222
Hits@level = [0]   0 [1]   3 [2]   3 [3]   0 [4]   3 [5]   0
Hits@level+ = [0+]   9 [1+]   9 [2+]   6 [3+]   3 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 0.680684 [1+] 0.680684 [2+] 0.453789 [3+] 0.226895 [4+] 0.226895 [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.