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/dfu-programmer-0.6.1/src/arguments.c
Examining data/dfu-programmer-0.6.1/src/arguments.h
Examining data/dfu-programmer-0.6.1/src/atmel.c
Examining data/dfu-programmer-0.6.1/src/atmel.h
Examining data/dfu-programmer-0.6.1/src/commands.c
Examining data/dfu-programmer-0.6.1/src/commands.h
Examining data/dfu-programmer-0.6.1/src/dfu-bool.h
Examining data/dfu-programmer-0.6.1/src/dfu-device.h
Examining data/dfu-programmer-0.6.1/src/dfu.c
Examining data/dfu-programmer-0.6.1/src/dfu.h
Examining data/dfu-programmer-0.6.1/src/intel_hex.c
Examining data/dfu-programmer-0.6.1/src/intel_hex.h
Examining data/dfu-programmer-0.6.1/src/main.c
Examining data/dfu-programmer-0.6.1/src/util.c
Examining data/dfu-programmer-0.6.1/src/util.h

FINAL RESULTS:

data/dfu-programmer-0.6.1/src/arguments.c:779:13:  [4] (format) fprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
            fprintf( stderr, PACKAGE_STRING "\n");
data/dfu-programmer-0.6.1/src/main.c:73:9:  [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( PACKAGE_STRING "\n" );
data/dfu-programmer-0.6.1/src/util.c:36:9:  [4] (format) vfprintf:
  If format strings can be influenced by an attacker, they can be exploited
  (CWE-134). Use a constant for the format specification.
        vfprintf( stderr, format, va_arg );
data/dfu-programmer-0.6.1/src/arguments.c:484:21:  [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 buffer[3] = {0,0,0};
data/dfu-programmer-0.6.1/src/arguments.h:149: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 device_type_string[DEVICE_TYPE_STRING_MAX_LENGTH];
data/dfu-programmer-0.6.1/src/intel_hex.c:46: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 data[256];
data/dfu-programmer-0.6.1/src/intel_hex.c:159: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 buffer[10];
data/dfu-programmer-0.6.1/src/intel_hex.c:240:14:  [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).
        fp = fopen( filename, "r" );
data/dfu-programmer-0.6.1/src/arguments.c:321:27:  [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).
        size_t name_len = strlen(map->name);
data/dfu-programmer-0.6.1/src/arguments.c:370:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
                    strncpy( args->device_type_string, "8051",
data/dfu-programmer-0.6.1/src/arguments.c:374:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
                    strncpy( args->device_type_string, "AVR",
data/dfu-programmer-0.6.1/src/arguments.c:378:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
                    strncpy( args->device_type_string, "AVR32",
data/dfu-programmer-0.6.1/src/arguments.c:382:21:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120). Risk is low because the source is a
  constant string.
                    strncpy( args->device_type_string, "XMEGA",
data/dfu-programmer-0.6.1/src/intel_hex.c:190:9:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    c = fgetc( fp );
data/dfu-programmer-0.6.1/src/intel_hex.c:192:13:  [1] (buffer) fgetc:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        c = fgetc( fp );

ANALYSIS SUMMARY:

Hits = 15
Lines analyzed = 5035 in approximately 0.21 seconds (24237 lines/second)
Physical Source Lines of Code (SLOC) = 3653
Hits@level = [0] 146 [1]   7 [2]   5 [3]   0 [4]   3 [5]   0
Hits@level+ = [0+] 161 [1+]  15 [2+]   8 [3+]   3 [4+]   3 [5+]   0
Hits/KSLOC@level+ = [0+] 44.0734 [1+] 4.10621 [2+] 2.18998 [3+] 0.821243 [4+] 0.821243 [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.