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/libdisasm-0.23/x86dis/x86dis.c
Examining data/libdisasm-0.23/test/insn-test.c
Examining data/libdisasm-0.23/test/testdis.c
Examining data/libdisasm-0.23/test/quikdis.c
Examining data/libdisasm-0.23/libdisasm/x86_imm.c
Examining data/libdisasm-0.23/libdisasm/qword.h
Examining data/libdisasm-0.23/libdisasm/ia32_modrm.c
Examining data/libdisasm-0.23/libdisasm/ia32_invariant.h
Examining data/libdisasm-0.23/libdisasm/ia32_implicit.c
Examining data/libdisasm-0.23/libdisasm/ia32_reg.c
Examining data/libdisasm-0.23/libdisasm/ia32_settings.h
Examining data/libdisasm-0.23/libdisasm/ia32_insn.h
Examining data/libdisasm-0.23/libdisasm/ia32_opcode_tables.c
Examining data/libdisasm-0.23/libdisasm/ia32_reg.h
Examining data/libdisasm-0.23/libdisasm/x86_operand_list.c
Examining data/libdisasm-0.23/libdisasm/ia32_insn.c
Examining data/libdisasm-0.23/libdisasm/x86_disasm.c
Examining data/libdisasm-0.23/libdisasm/x86_operand_list.h
Examining data/libdisasm-0.23/libdisasm/ia32_modrm.h
Examining data/libdisasm-0.23/libdisasm/x86_imm.h
Examining data/libdisasm-0.23/libdisasm/ia32_settings.c
Examining data/libdisasm-0.23/libdisasm/x86_misc.c
Examining data/libdisasm-0.23/libdisasm/x86_format.c
Examining data/libdisasm-0.23/libdisasm/libdis.h
Examining data/libdisasm-0.23/libdisasm/ia32_operand.h
Examining data/libdisasm-0.23/libdisasm/ia32_opcode_tables.h
Examining data/libdisasm-0.23/libdisasm/ia32_operand.c
Examining data/libdisasm-0.23/libdisasm/ia32_invariant.c
Examining data/libdisasm-0.23/libdisasm/ia32_implicit.h
Examining data/libdisasm-0.23/libdisasm/x86_insn.c

FINAL RESULTS:

data/libdisasm-0.23/libdisasm/ia32_implicit.c:416:7:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		op->access |= access;
data/libdisasm-0.23/libdisasm/ia32_implicit.c:416:17:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		op->access |= access;
data/libdisasm-0.23/libdisasm/libdis.h:238:33:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        enum x86_op_access      access;         /* operand access [RWX] */
data/libdisasm-0.23/libdisasm/libdis.h:811:33:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
        enum x86_op_access      access;         /* operand access [RWX] */
data/libdisasm-0.23/libdisasm/x86_disasm.c:12:17:  [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/libdisasm-0.23/libdisasm/x86_disasm.c:12:33:  [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/libdisasm-0.23/libdisasm/x86_format.c:9:17:  [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/libdisasm-0.23/libdisasm/x86_format.c:9:33:  [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/libdisasm-0.23/libdisasm/x86_format.c:34:9:  [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.
        snprintf( _tmp, sizeof _tmp, fmt, data );   \
data/libdisasm-0.23/libdisasm/x86_format.c:80:33:  [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.
                                snprintf( str, len, "%" PRId8, op->data.sbyte );
data/libdisasm-0.23/libdisasm/x86_format.c:83:33:  [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.
                                snprintf( str, len, "%" PRId16, op->data.sword );
data/libdisasm-0.23/libdisasm/x86_format.c:86:33:  [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.
                                snprintf( str, len, "%" PRId64, op->data.sqword );
data/libdisasm-0.23/libdisasm/x86_format.c:89:33:  [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.
                                snprintf( str, len, "%" PRId32, op->data.sdword );
data/libdisasm-0.23/libdisasm/x86_format.c:97:25:  [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.
                        snprintf( str, len, "0x%02" PRIX8, op->data.byte );
data/libdisasm-0.23/libdisasm/x86_format.c:100:25:  [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.
                        snprintf( str, len, "0x%04" PRIX16, op->data.word );
data/libdisasm-0.23/libdisasm/x86_format.c:103:25:  [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.
                        snprintf( str, len, "0x%08" PRIX64,op->data.sqword );
data/libdisasm-0.23/libdisasm/x86_format.c:106:25:  [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.
                        snprintf( str, len, "0x%08" PRIX32, op->data.dword );
data/libdisasm-0.23/libdisasm/x86_insn.c:7:17:  [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/libdisasm-0.23/libdisasm/x86_insn.c:7:33:  [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/libdisasm-0.23/libdisasm/x86_insn.c:64:19:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
		if ( op_lst->op.access & op_execute ) {
data/libdisasm-0.23/libdisasm/x86_misc.c:12:17:  [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/libdisasm-0.23/libdisasm/x86_misc.c:12:33:  [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/libdisasm-0.23/libdisasm/x86_operand_list.c:107:21:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
				if (! (list->op.access & op_write) ) {
data/libdisasm-0.23/libdisasm/x86_operand_list.c:112:21:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
				if (! (list->op.access & op_read) ) {
data/libdisasm-0.23/libdisasm/x86_operand_list.c:117:21:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
				if (! (list->op.access & op_read) ||
data/libdisasm-0.23/libdisasm/x86_operand_list.c:118:21:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
				      (list->op.access & op_write ) ) {
data/libdisasm-0.23/libdisasm/x86_operand_list.c:123:21:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
				if (! (list->op.access & op_write) ||
data/libdisasm-0.23/libdisasm/x86_operand_list.c:124:21:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
				      (list->op.access & op_read ) ) {
data/libdisasm-0.23/libdisasm/x86_operand_list.c:129:21:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
				if (! (list->op.access & op_execute) ) {
data/libdisasm-0.23/libdisasm/x86_operand_list.c:134:21:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
				if (! (list->op.access & op_write) ||
data/libdisasm-0.23/libdisasm/x86_operand_list.c:135:21:  [4] (race) access:
  This usually indicates a security flaw. If an attacker can change anything
  along the path between the call to access() and the file's actual use
  (e.g., by moving files), the attacker can exploit the race condition
  (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid())
  and try to open the file directly.
				    ! (list->op.access & op_read ) ) {
data/libdisasm-0.23/test/quikdis.c:67: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("%08" PRIX32, insn->addr );
data/libdisasm-0.23/x86dis/x86dis.c:99: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("%08" PRIX32, insn->addr );
data/libdisasm-0.23/libdisasm/ia32_insn.h:28:17:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
                strcpy( i->mnemonic, "invalid" );       \
data/libdisasm-0.23/libdisasm/ia32_insn.h:33:17:  [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( i->bytes, buf, 1 );
data/libdisasm-0.23/libdisasm/ia32_insn.h:48:4:  [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 mnemonic[16];           /* buffers for building instruction */
data/libdisasm-0.23/libdisasm/ia32_insn.h:49:4:  [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 mnemonic_att[16];       /* at&t style mnemonic name */
data/libdisasm-0.23/libdisasm/ia32_insn.h:485:2:  [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 prefix_str[16];		/* mnemonics for prefix */
data/libdisasm-0.23/libdisasm/ia32_invariant.c:235:6:  [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( &out[bytes + modrm], 
data/libdisasm-0.23/libdisasm/ia32_invariant.c:294:2:  [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( inv->bytes, buf, size );
data/libdisasm-0.23/libdisasm/ia32_reg.c:72:2:  [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 mnemonic[8];
data/libdisasm-0.23/libdisasm/libdis.h:132:9:  [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 name[MAX_REGNAME];
data/libdisasm-0.23/libdisasm/libdis.h:254:26:  [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   extreal[10];
data/libdisasm-0.23/libdisasm/libdis.h:255:26:  [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   bcd[10];
data/libdisasm-0.23/libdisasm/libdis.h:257:26:  [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   simd[16];
data/libdisasm-0.23/libdisasm/libdis.h:258:26:  [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   fpuenv[28];
data/libdisasm-0.23/libdisasm/libdis.h:497: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 bytes[MAX_INSN_SIZE];
data/libdisasm-0.23/libdisasm/libdis.h:514:9:  [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 prefix_string[MAX_PREFIX_STR]; /* prefixes [might be truncated] */
data/libdisasm-0.23/libdisasm/libdis.h:515:9:  [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 mnemonic[MAX_MNEM_STR];
data/libdisasm-0.23/libdisasm/libdis.h:816:11:  [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 bytes[64];	/* invariant representation */
data/libdisasm-0.23/libdisasm/x86_disasm.c:20:11:  [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 bytes[MAX_INSTRUCTION_SIZE];
data/libdisasm-0.23/libdisasm/x86_disasm.c:47:2:  [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( bytes, &buf[offset], (len < MAX_INSTRUCTION_SIZE) ? len : 
data/libdisasm-0.23/libdisasm/x86_disasm.c:68: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( insn->bytes, bytes, size );
data/libdisasm-0.23/libdisasm/x86_format.c:32:9:  [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[MAX_OP_STRING];                   \
data/libdisasm-0.23/libdisasm/x86_format.c:163:9:  [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 str[MAX_OP_STRING];
data/libdisasm-0.23/libdisasm/x86_format.c:648:9:  [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 str[MAX_OP_STRING];
data/libdisasm-0.23/libdisasm/x86_format.c:722:9:  [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 str[MAX_OP_STRING];
data/libdisasm-0.23/libdisasm/x86_format.c:786:9:  [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 str[MAX_OP_STRING] = "\0";
data/libdisasm-0.23/libdisasm/x86_format.c:887:9:  [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 str[MAX_OP_RAW_STRING];
data/libdisasm-0.23/libdisasm/x86_format.c:1073:9:  [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 str[MAX_OP_STRING];
data/libdisasm-0.23/libdisasm/x86_format.c:1096:2:  [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 note[32] = {0};
data/libdisasm-0.23/libdisasm/x86_format.c:1165:9:  [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 str[MAX_OP_XML_STRING];
data/libdisasm-0.23/libdisasm/x86_format.c:1304:9:  [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 str[MAX_OP_STRING];
data/libdisasm-0.23/test/insn-test.c:11: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 buf[1024];
data/libdisasm-0.23/test/quikdis.c:39:9:  [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 line[256];
data/libdisasm-0.23/test/quikdis.c:45:9:  [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 line[256];
data/libdisasm-0.23/test/quikdis.c:51:9:  [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 line[4096];
data/libdisasm-0.23/test/quikdis.c:57:9:  [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 line[1024];
data/libdisasm-0.23/test/quikdis.c:63:9:  [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 buf[MAX_OP_STRING];
data/libdisasm-0.23/test/quikdis.c:159:2:  [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 line[1024];
data/libdisasm-0.23/test/quikdis.c:176:21:  [2] (misc) open:
  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).
        target_fd = open(argv[1], O_RDONLY);
data/libdisasm-0.23/test/testdis.c:22:2:  [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 line[80];
data/libdisasm-0.23/test/testdis.c:29:6:  [2] (misc) open:
  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 = open(argv[1], O_RDONLY);
data/libdisasm-0.23/x86dis/x86dis.c:89:2:  [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 line[4096];
data/libdisasm-0.23/x86dis/x86dis.c:344:11:  [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 *bytes, buf[128];
data/libdisasm-0.23/x86dis/x86dis.c:400:2:  [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 *s, *d, lname[16] = {0};
data/libdisasm-0.23/x86dis/x86dis.c:455:2:  [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 buf[2048];
data/libdisasm-0.23/x86dis/x86dis.c:488:12:  [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).
	info.in = fopen(name, "r");
data/libdisasm-0.23/x86dis/x86dis.c:504:13:  [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).
	info.out = fopen(name, "w+");
data/libdisasm-0.23/x86dis/x86dis.c:520:13:  [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).
	info.err = fopen(name, "w+");
data/libdisasm-0.23/libdisasm/ia32_insn.c:226:17:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
                strncat(insn->prefix_string, "lock ", 32 - 
data/libdisasm-0.23/libdisasm/ia32_insn.c:227:5:  [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).
				strlen(insn->prefix_string));
data/libdisasm-0.23/libdisasm/ia32_insn.c:231:17:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
                strncat(insn->prefix_string, "repnz ", 32  - 
data/libdisasm-0.23/libdisasm/ia32_insn.c:232:5:  [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).
				strlen(insn->prefix_string));
data/libdisasm-0.23/libdisasm/ia32_insn.c:234:17:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings. Risk is low because the source is a
  constant string.
                strncat(insn->prefix_string, "repz ", 32 - 
data/libdisasm-0.23/libdisasm/ia32_insn.c:235:5:  [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).
				strlen(insn->prefix_string));
data/libdisasm-0.23/libdisasm/ia32_insn.c:283:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy( insn->mnemonic, raw_insn->mnemonic_att, 16 );
data/libdisasm-0.23/libdisasm/ia32_insn.c:286:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
		strncpy( insn->mnemonic, raw_insn->mnemonic, 16 );
data/libdisasm-0.23/libdisasm/ia32_insn.c:553:2:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	strncpy( insn->mnemonic, sfx_insn->mnemonic, 16 );
data/libdisasm-0.23/libdisasm/ia32_reg.c:207:9:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
        strncpy( reg->name, ia32_reg_table[id].mnemonic, MAX_REGNAME );
data/libdisasm-0.23/libdisasm/x86_format.c:19:11:  [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).
	int _i = strlen(str), _blen = strlen(buf), _len = len - 1;  	\
data/libdisasm-0.23/libdisasm/x86_format.c:19:32:  [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).
	int _i = strlen(str), _blen = strlen(buf), _len = len - 1;  	\
data/libdisasm-0.23/libdisasm/x86_format.c:21:10:  [1] (buffer) strncat:
  Easily used incorrectly (e.g., incorrectly computing the correct maximum
  size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf,
  or automatically resizing strings.
        	strncat( buf, str, _len );  				\
data/libdisasm-0.23/libdisasm/x86_format.c:282:17:  [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).
        return( strlen(buf) );
data/libdisasm-0.23/libdisasm/x86_format.c:716:18:  [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).
        return ( strlen( buf ) );
data/libdisasm-0.23/libdisasm/x86_format.c:780:17:  [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).
        return( strlen( buf ) );
data/libdisasm-0.23/libdisasm/x86_format.c:881:17:  [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).
        return( strlen( buf ) );
data/libdisasm-0.23/libdisasm/x86_format.c:980:17:  [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).
        return( strlen( buf ) );
data/libdisasm-0.23/libdisasm/x86_format.c:1035:26:  [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).
                return ( strlen( buf ) );
data/libdisasm-0.23/libdisasm/x86_format.c:1068:18:  [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).
        return ( strlen( buf ) );
data/libdisasm-0.23/libdisasm/x86_format.c:1084:17:  [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).
        return( strlen( buf ) );
data/libdisasm-0.23/libdisasm/x86_format.c:1161:17:  [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).
        return( strlen (buf) );
data/libdisasm-0.23/libdisasm/x86_format.c:1225:16:  [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).
        return strlen (buf);
data/libdisasm-0.23/libdisasm/x86_format.c:1299:17:  [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).
        return( strlen(buf) );
data/libdisasm-0.23/libdisasm/x86_format.c:1428:17:  [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).
        return( strlen( buf ) );

ANALYSIS SUMMARY:

Hits = 105
Lines analyzed = 10234 in approximately 0.59 seconds (17365 lines/second)
Physical Source Lines of Code (SLOC) = 8028
Hits@level = [0]  76 [1]  25 [2]  47 [3]   0 [4]  33 [5]   0
Hits@level+ = [0+] 181 [1+] 105 [2+]  80 [3+]  33 [4+]  33 [5+]   0
Hits/KSLOC@level+ = [0+] 22.5461 [1+] 13.0792 [2+] 9.96512 [3+] 4.11061 [4+] 4.11061 [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.