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/ucl-1.03+repack/include/ucl/ucl.h
Examining data/ucl-1.03+repack/include/ucl/ucl_asm.h
Examining data/ucl-1.03+repack/include/ucl/uclconf.h
Examining data/ucl-1.03+repack/src/alloc.c
Examining data/ucl-1.03+repack/src/n2b_99.c
Examining data/ucl-1.03+repack/src/n2b_ds.c
Examining data/ucl-1.03+repack/src/n2b_to.c
Examining data/ucl-1.03+repack/src/n2d_99.c
Examining data/ucl-1.03+repack/src/n2d_d.c
Examining data/ucl-1.03+repack/src/n2d_ds.c
Examining data/ucl-1.03+repack/src/n2d_to.c
Examining data/ucl-1.03+repack/src/n2e_99.c
Examining data/ucl-1.03+repack/src/n2e_ds.c
Examining data/ucl-1.03+repack/src/n2e_to.c
Examining data/ucl-1.03+repack/src/ucl_crc.c
Examining data/ucl-1.03+repack/src/ucl_init.c
Examining data/ucl-1.03+repack/src/ucl_ptr.c
Examining data/ucl-1.03+repack/src/ucl_str.c
Examining data/ucl-1.03+repack/src/getbit.h
Examining data/ucl-1.03+repack/src/ucl_conf.h
Examining data/ucl-1.03+repack/src/ucl_ptr.h
Examining data/ucl-1.03+repack/src/ucl_util.c
Examining data/ucl-1.03+repack/src/n2b_d.c
Examining data/ucl-1.03+repack/src/n2e_d.c
Examining data/ucl-1.03+repack/examples/portab_a.h
Examining data/ucl-1.03+repack/examples/portab.h
Examining data/ucl-1.03+repack/examples/simple.c
Examining data/ucl-1.03+repack/examples/uclpack.c
Examining data/ucl-1.03+repack/acc/acc.h
Examining data/ucl-1.03+repack/acc/acc_auto.h
Examining data/ucl-1.03+repack/acc/acc_cc.h
Examining data/ucl-1.03+repack/acc/acc_cxx.h
Examining data/ucl-1.03+repack/acc/acc_incd.h
Examining data/ucl-1.03+repack/acc/acc_ince.h
Examining data/ucl-1.03+repack/acc/acc_inci.h
Examining data/ucl-1.03+repack/acc/acc_init.h
Examining data/ucl-1.03+repack/acc/acc_lib.h
Examining data/ucl-1.03+repack/acc/acc_mm.h
Examining data/ucl-1.03+repack/acc/acc_os.h
Examining data/ucl-1.03+repack/acc/acc_type.h
Examining data/ucl-1.03+repack/acc/acc_defs.h
Examining data/ucl-1.03+repack/acc/acc_arch.h

FINAL RESULTS:

data/ucl-1.03+repack/acc/acc_auto.h:411:11:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:411:20:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:412:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  define vsnprintf _vsnprintf
data/ucl-1.03+repack/acc/acc_auto.h:423:11:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:423:20:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:424:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  define vsnprintf _vsnprintf
data/ucl-1.03+repack/acc/acc_auto.h:435:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#    define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:435:22:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#    define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:436:13:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#    define vsnprintf _vsnprintf
data/ucl-1.03+repack/acc/acc_auto.h:450:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#    define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:450:22:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#    define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:451:13:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#    define vsnprintf _vsnprintf
data/ucl-1.03+repack/acc/acc_auto.h:484:11:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:484:20:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:485:11:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#  define vsnprintf _vsnprintf
data/ucl-1.03+repack/acc/acc_auto.h:497:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#    define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:497:22:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#    define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:498:13:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#    define vsnprintf _vsnprintf
data/ucl-1.03+repack/acc/acc_auto.h:527:13:  [4] (format) snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#    define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:527:22:  [4] (format) _snprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#    define snprintf _snprintf
data/ucl-1.03+repack/acc/acc_auto.h:528:13:  [4] (format) vsnprintf:
  If format strings can be influenced by an attacker, they can be exploited,
  and note that sprintf variations do not always \0-terminate (CWE-134). Use
  a constant for the format specification.
#    define vsnprintf _vsnprintf
data/ucl-1.03+repack/acc/acc_lib.h:238: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 f_name[ACC_FN_NAME_MAX+1];
data/ucl-1.03+repack/acc/acc_lib.h:244: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 f_name[ACC_FN_NAME_MAX+1];
data/ucl-1.03+repack/acc/acc_lib.h:246: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 u_dta[21]; /* private */
data/ucl-1.03+repack/acc/acc_lib.h:252: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 f_name[ACC_FN_NAME_MAX+1];
data/ucl-1.03+repack/acc/acc_lib.h:256: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 f_name[ACC_FN_NAME_MAX+1];
data/ucl-1.03+repack/examples/uclpack.c:77:23:  [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.
static const unsigned char magic[8] =
data/ucl-1.03+repack/examples/uclpack.c:147: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 b[4];
data/ucl-1.03+repack/examples/uclpack.c:160: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 b[4];
data/ucl-1.03+repack/examples/uclpack.c:182:8:  [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.
static char method_name[64];
data/ucl-1.03+repack/examples/uclpack.c:190:9:  [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(method_name,"NRV2B-99/%d", level);
data/ucl-1.03+repack/examples/uclpack.c:192:9:  [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(method_name,"NRV2D-99/%d", level);
data/ucl-1.03+repack/examples/uclpack.c:194:9:  [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(method_name,"NRV2E-99/%d", level);
data/ucl-1.03+repack/examples/uclpack.c:384: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 [ sizeof(magic) ];
data/ucl-1.03+repack/examples/uclpack.c:584:9:  [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).
    f = fopen(name,"rb");
data/ucl-1.03+repack/examples/uclpack.c:616:9:  [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).
    f = fopen(name,"rb");
data/ucl-1.03+repack/examples/uclpack.c:624:9:  [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).
    f = fopen(name,"wb");
data/ucl-1.03+repack/examples/uclpack.c:731:22:  [2] (integer) atol:
  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).
            long x = atol(&argv[i][2]);
data/ucl-1.03+repack/examples/uclpack.c:742:22:  [2] (integer) atol:
  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).
            long x = atol(&argv[i][2]);
data/ucl-1.03+repack/src/ucl_conf.h:68:33:  [2] (buffer) memcpy:
  Does not check for buffer overflows when copying to destination (CWE-120).
  Make sure destination can always hold the source data.
#  define ucl_memcpy(a,b,c)     memcpy(a,b,c)
data/ucl-1.03+repack/src/ucl_init.c:99: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 _wrkmem[10 * sizeof(ucl_bytep) + sizeof(ucl_align_t)];
data/ucl-1.03+repack/src/ucl_init.c:102: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 x[4 * sizeof(ucl_align_t)];
data/ucl-1.03+repack/src/ucl_init.c:189: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 x[4*sizeof(ucl_align_t)];

ANALYSIS SUMMARY:

Hits = 43
Lines analyzed = 7751 in approximately 0.45 seconds (17371 lines/second)
Physical Source Lines of Code (SLOC) = 5073
Hits@level = [0]  69 [1]   0 [2]  22 [3]   0 [4]  21 [5]   0
Hits@level+ = [0+] 112 [1+]  43 [2+]  43 [3+]  21 [4+]  21 [5+]   0
Hits/KSLOC@level+ = [0+] 22.0777 [1+] 8.47625 [2+] 8.47625 [3+] 4.13956 [4+] 4.13956 [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.