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/imvirt-0.9.6/helper/detect.c
Examining data/imvirt-0.9.6/helper/detect.h
Examining data/imvirt-0.9.6/helper/hvm.c
Examining data/imvirt-0.9.6/helper/hyperv.c
Examining data/imvirt-0.9.6/helper/pillbox.c
Examining data/imvirt-0.9.6/helper/vmware.c
Examining data/imvirt-0.9.6/helper/xen.c

FINAL RESULTS:

data/imvirt-0.9.6/helper/pillbox.c:43:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(",idt,%" PRIu64 ",idt2,%" PRIu64, old, idt);
data/imvirt-0.9.6/helper/pillbox.c:48:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  printf(",idt,%" PRIu64, old);
data/imvirt-0.9.6/helper/pillbox.c:62:2:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
	printf(",gdt,%" PRIu64 ",gdt2,%" PRIu64, old, gdt);
data/imvirt-0.9.6/helper/pillbox.c:67:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  printf(",gdt,%" PRIu64, old);
data/imvirt-0.9.6/helper/pillbox.c:75:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  printf(",ldt,%" PRIu64, ldt);
data/imvirt-0.9.6/helper/pillbox.c:83:3:  [4] (format) printf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
  printf(",tr,%" PRIu64, tr);
data/imvirt-0.9.6/helper/detect.c:36:20:  [3] (buffer) getopt:
  Some older implementations do not protect against internal buffer overflows
  (CWE-120, CWE-20). Check implementation on installation, or limit the size
  of all string inputs.
    while ((opts = getopt(argc, argv, "c")) != EOF) {
data/imvirt-0.9.6/helper/hvm.c:35: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 signature[13];
data/imvirt-0.9.6/helper/hvm.c:38: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(&signature[0], &ebx, 4);
data/imvirt-0.9.6/helper/hvm.c:39: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(&signature[4], &ecx, 4);
data/imvirt-0.9.6/helper/hvm.c:40: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(&signature[8], &edx, 4);
data/imvirt-0.9.6/helper/hyperv.c:36: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 signature[13];
data/imvirt-0.9.6/helper/hyperv.c:39: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(&signature[0], &ebx, 4);
data/imvirt-0.9.6/helper/hyperv.c:40: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(&signature[4], &ecx, 4);
data/imvirt-0.9.6/helper/hyperv.c:41: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(&signature[8], &edx, 4);
data/imvirt-0.9.6/helper/xen.c:64: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 signature[13];
data/imvirt-0.9.6/helper/xen.c:67: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(&signature[0], &ebx, 4);
data/imvirt-0.9.6/helper/xen.c:68: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(&signature[4], &ecx, 4);
data/imvirt-0.9.6/helper/xen.c:69: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(&signature[8], &edx, 4);
data/imvirt-0.9.6/helper/hvm.c:50:8:  [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(signature) && isprint(signature[0])) {

ANALYSIS SUMMARY:

Hits = 20
Lines analyzed = 590 in approximately 0.07 seconds (8073 lines/second)
Physical Source Lines of Code (SLOC) = 316
Hits@level = [0]  10 [1]   1 [2]  12 [3]   1 [4]   6 [5]   0
Hits@level+ = [0+]  30 [1+]  20 [2+]  19 [3+]   7 [4+]   6 [5+]   0
Hits/KSLOC@level+ = [0+] 94.9367 [1+] 63.2911 [2+] 60.1266 [3+] 22.1519 [4+] 18.9873 [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.