capstone-5.0.1-4.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
capstone-5.0.1-build/capstone-5.0.1/MCInst.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def2]
capstone-5.0.1-build/capstone-5.0.1/arch/AArch64/AArch64InstPrinter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def3]
capstone-5.0.1-build/capstone-5.0.1/arch/ARM/ARMInstPrinter.c:25: included_from: Included from here.
capstone-5.0.1-build/capstone-5.0.1/arch/ARM/ARMAddressingModes.h:90:14: warning[core.BitwiseShift]: Right shift by '32' overflows the capacity of 'unsigned int'
#   88|   {
#   89|   	//assert(Amt < 32 && "Invalid rotate amount");
#   90|-> 	return (Val >> Amt) | (Val << ((32-Amt)&31));
#   91|   }
#   92|   

Error: CPPCHECK_WARNING (CWE-758): [#def4]
capstone-5.0.1-build/capstone-5.0.1/arch/ARM/ARMBaseInfo.h:228: error[missingReturn]: Found an exit path from function with non-void return type that has missing return statement
#  226|   inline static const char *ARMII_AddrModeToString(ARMII_AddrMode addrmode)
#  227|   {
#  228|-> 	switch (addrmode) {
#  229|   		case ARMII_AddrModeNone:    return "AddrModeNone";
#  230|   		case ARMII_AddrMode1:       return "AddrMode1";

Error: CPPCHECK_WARNING: [#def5]
capstone-5.0.1-build/capstone-5.0.1/arch/ARM/ARMDisassembler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def6]
capstone-5.0.1-build/capstone-5.0.1/arch/ARM/ARMInstPrinter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
capstone-5.0.1-build/capstone-5.0.1/arch/ARM/ARMInstPrinter.c: scope_hint: In function ‘printBankedRegOperand’
capstone-5.0.1-build/capstone-5.0.1/arch/ARM/ARMInstPrinter.c:1835:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
capstone-5.0.1-build/capstone-5.0.1/arch/ARM/ARMInstPrinter.c:37: included_from: Included from here.
# 1833|   	const BankedReg *TheReg = lookupBankedRegByEncoding(Banked);
# 1834|   
# 1835|-> 	SStream_concat0(O, TheReg->Name);
# 1836|   	ARM_addSysReg(MI, TheReg->sysreg);
# 1837|   }

Error: CPPCHECK_WARNING: [#def8]
capstone-5.0.1-build/capstone-5.0.1/arch/BPF/BPFDisassembler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def9]
capstone-5.0.1-build/capstone-5.0.1/arch/BPF/BPFInstPrinter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def10]
capstone-5.0.1-build/capstone-5.0.1/arch/EVM/EVMDisassembler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def11]
capstone-5.0.1-build/capstone-5.0.1/arch/M680X/M680XDisassembler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def12]
capstone-5.0.1-build/capstone-5.0.1/arch/M680X/M680XDisassembler.c:1129:26: warning[core.NullDereference]: Array access (from variable 'reg_to_reg_ids') results in a null pointer dereference
# 1127|   	for (bit_index = 0; bit_index < 8; ++bit_index) {
# 1128|   		if (reg_bits & (1 << bit_index))
# 1129|-> 			add_reg_operand(info, reg_to_reg_ids[bit_index]);
# 1130|   	}
# 1131|   }

Error: CLANG_WARNING: [#def13]
capstone-5.0.1-build/capstone-5.0.1/arch/M680X/M680XDisassembler.c:1683:2: warning[deadcode.DeadStores]: Value stored to 'address' is never read
# 1681|   
# 1682|   	read_word(info, &offset, *address);
# 1683|-> 	address += 2;
# 1684|   
# 1685|   	add_indexed_operand(info, M680X_REG_S, false, 0, M680X_OFFSET_BITS_16,

Error: CPPCHECK_WARNING: [#def14]
capstone-5.0.1-build/capstone-5.0.1/arch/M680X/M680XInstPrinter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def15]
capstone-5.0.1-build/capstone-5.0.1/arch/M68K/M68KDisassembler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def16]
capstone-5.0.1-build/capstone-5.0.1/arch/M68K/M68KDisassembler.c:880:9: warning[deadcode.DeadStores]: Although the value stored to 'r' is used in the enclosing expression, the value is never actually read from 'r'
#  878|   	}
#  879|   
#  880|-> 	return r <<= s; // shift when v's highest bits are zero
#  881|   }
#  882|   

Error: CLANG_WARNING: [#def17]
capstone-5.0.1-build/capstone-5.0.1/arch/M68K/M68KDisassembler.c:894:9: warning[deadcode.DeadStores]: Although the value stored to 'r' is used in the enclosing expression, the value is never actually read from 'r'
#  892|   	}
#  893|   
#  894|-> 	return r <<= s; // shift when v's highest bits are zero
#  895|   }
#  896|   

Error: CPPCHECK_WARNING: [#def18]
capstone-5.0.1-build/capstone-5.0.1/arch/MOS65XX/MOS65XXDisassembler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def19]
capstone-5.0.1-build/capstone-5.0.1/arch/Mips/MipsDisassembler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def20]
capstone-5.0.1-build/capstone-5.0.1/arch/Mips/MipsInstPrinter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def21]
capstone-5.0.1-build/capstone-5.0.1/arch/PowerPC/PPCDisassembler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def22]
capstone-5.0.1-build/capstone-5.0.1/arch/PowerPC/PPCInstPrinter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def23]
capstone-5.0.1-build/capstone-5.0.1/arch/RISCV/RISCVInstPrinter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def24]
capstone-5.0.1-build/capstone-5.0.1/arch/SH/SHDisassembler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def25]
capstone-5.0.1-build/capstone-5.0.1/arch/SH/SHDisassembler.c:937:4: warning[deadcode.DeadStores]: Value stored to 'insn' is never read
#  935|   			break;
#  936|   		case 2:
#  937|-> 			insn = SH_INS_JMP;
#  938|   			grp = SH_GRP_JUMP;
#  939|   			break;

Error: CPPCHECK_WARNING: [#def26]
capstone-5.0.1-build/capstone-5.0.1/arch/Sparc/SparcDisassembler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def27]
capstone-5.0.1-build/capstone-5.0.1/arch/Sparc/SparcInstPrinter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def28]
capstone-5.0.1-build/capstone-5.0.1/arch/TMS320C64x/TMS320C64xDisassembler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def29]
capstone-5.0.1-build/capstone-5.0.1/arch/TMS320C64x/TMS320C64xInstPrinter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def30]
capstone-5.0.1-build/capstone-5.0.1/arch/TriCore/TriCoreDisassembler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def31]
capstone-5.0.1-build/capstone-5.0.1/arch/TriCore/TriCoreDisassembler.c:766:5: warning[deadcode.DeadStores]: Value stored to 'status' is never read
#  764|   			case TRICORE_ABS_B_rr:
#  765|   			case TRICORE_ABS_rr: {
#  766|-> 				status = DecodeRegisterClass(Inst, s2, &desc->OpInfo[1],
#  767|   							     Decoder);
#  768|   				break;

Error: CPPCHECK_WARNING (CWE-758): [#def32]
capstone-5.0.1-build/capstone-5.0.1/arch/TriCore/TriCoreInstPrinter.c:246: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  244|   		uint64_t imm = MCOperand_getImm(MO);
#  245|   		for (unsigned i = n + 1; i < 32; ++i) {
#  246|-> 			imm &= ~(1 << i);
#  247|   		}
#  248|   		if (n == 4) {

Error: CPPCHECK_WARNING: [#def33]
capstone-5.0.1-build/capstone-5.0.1/arch/WASM/WASMDisassembler.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def34]
capstone-5.0.1-build/capstone-5.0.1/arch/XCore/XCoreInstPrinter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def35]
capstone-5.0.1-build/capstone-5.0.1/cs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def36]
capstone-5.0.1-build/capstone-5.0.1/cs.c: scope_hint: In function ‘str_replace’
capstone-5.0.1-build/capstone-5.0.1/cs.c:554:30: warning[-Wanalyzer-null-argument]: use of NULL ‘str1’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  552|   {
#  553|   	// only perform replacement if the output fits into result
#  554|-> 	if (strlen(target) - strlen(str1) + strlen(str2) < CS_MNEMONIC_SIZE - 1)  {
#  555|   		// copy str2 to begining of result
#  556|   		strcpy(result, str2);

Error: CPPCHECK_WARNING: [#def37]
capstone-5.0.1-build/capstone-5.0.1/cstool/cstool.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
capstone-5.0.1-build/capstone-5.0.1/cstool/cstool.c: scope_hint: In function ‘main’
capstone-5.0.1-build/capstone-5.0.1/cstool/cstool.c:156:26: warning[-Wanalyzer-malloc-leak]: leak of ‘preprocess(*<unknown>, & size)’
#  154|   	uint8_t *result;
#  155|   
#  156|-> 	if (strlen(code) == 0)
#  157|   		return NULL;
#  158|   

Error: CLANG_WARNING: [#def39]
capstone-5.0.1-build/capstone-5.0.1/cstool/cstool.c:567:3: warning[unix.Malloc]: Potential leak of memory pointed to by 'assembly'
#  565|   
#  566|   	if (arch == CS_ARCH_ALL) {
#  567|-> 		printf("ERROR: Invalid <arch+mode>: \"%s\", quit!\n", mode);
#  568|   		usage(argv[0]);
#  569|   		return -1;

Error: CPPCHECK_WARNING: [#def40]
capstone-5.0.1-build/capstone-5.0.1/cstool/cstool_arm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def41]
capstone-5.0.1-build/capstone-5.0.1/cstool/cstool_arm64.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def42]
capstone-5.0.1-build/capstone-5.0.1/cstool/cstool_m680x.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def43]
capstone-5.0.1-build/capstone-5.0.1/cstool/cstool_tms320c64x.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def44]
capstone-5.0.1-build/capstone-5.0.1/cstool/cstool_x86.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def45]
capstone-5.0.1-build/capstone-5.0.1/cstool/getopt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def46]
capstone-5.0.1-build/capstone-5.0.1/tests/test_arm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def47]
capstone-5.0.1-build/capstone-5.0.1/tests/test_arm64.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def48]
capstone-5.0.1-build/capstone-5.0.1/tests/test_basic.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-190): [#def49]
capstone-5.0.1-build/capstone-5.0.1/tests/test_basic.c:192: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_MIPS32+CS_MODE_BIG_ENDIAN'.
#  190|   		{
#  191|   			CS_ARCH_MIPS,
#  192|-> 			(cs_mode)(CS_MODE_MIPS32 + CS_MODE_BIG_ENDIAN),
#  193|   			(unsigned char*)MIPS_CODE,
#  194|   			sizeof(MIPS_CODE) - 1,

Error: CPPCHECK_WARNING (CWE-190): [#def50]
capstone-5.0.1-build/capstone-5.0.1/tests/test_basic.c:206: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_MIPS32R6+CS_MODE_MICRO+CS_MODE_BIG_ENDIAN'.
#  204|   		{
#  205|   			CS_ARCH_MIPS,
#  206|-> 			(cs_mode)(CS_MODE_MIPS32R6 + CS_MODE_MICRO + CS_MODE_BIG_ENDIAN),
#  207|   			(unsigned char*)MIPS_32R6M,
#  208|   			sizeof(MIPS_32R6M) - 1,

Error: CPPCHECK_WARNING (CWE-190): [#def51]
capstone-5.0.1-build/capstone-5.0.1/tests/test_basic.c:213: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_MIPS32R6+CS_MODE_BIG_ENDIAN'.
#  211|   		{
#  212|   			CS_ARCH_MIPS,
#  213|-> 			(cs_mode)(CS_MODE_MIPS32R6 + CS_MODE_BIG_ENDIAN),
#  214|   			(unsigned char*)MIPS_32R6,
#  215|   			sizeof(MIPS_32R6) - 1,

Error: CPPCHECK_WARNING (CWE-190): [#def52]
capstone-5.0.1-build/capstone-5.0.1/tests/test_basic.c:247: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_BIG_ENDIAN+CS_MODE_QPX'.
#  245|   		{
#  246|   			CS_ARCH_PPC,
#  247|-> 			CS_MODE_BIG_ENDIAN + CS_MODE_QPX,
#  248|   			(unsigned char*)PPC_CODE2,
#  249|   			sizeof(PPC_CODE2) - 1,

Error: CPPCHECK_WARNING (CWE-190): [#def53]
capstone-5.0.1-build/capstone-5.0.1/tests/test_basic.c:263: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_BIG_ENDIAN+CS_MODE_V9'.
#  261|   		{
#  262|   			CS_ARCH_SPARC,
#  263|-> 			(cs_mode)(CS_MODE_BIG_ENDIAN + CS_MODE_V9),
#  264|   			(unsigned char*)SPARCV9_CODE,
#  265|   			sizeof(SPARCV9_CODE) - 1,

Error: CPPCHECK_WARNING: [#def54]
capstone-5.0.1-build/capstone-5.0.1/tests/test_detail.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-190): [#def55]
capstone-5.0.1-build/capstone-5.0.1/tests/test_detail.c:160: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_MIPS32+CS_MODE_BIG_ENDIAN'.
#  158|   		{
#  159|   			CS_ARCH_MIPS,
#  160|-> 			(cs_mode)(CS_MODE_MIPS32 + CS_MODE_BIG_ENDIAN),
#  161|   			(unsigned char *)MIPS_CODE,
#  162|   			sizeof(MIPS_CODE) - 1,

Error: CPPCHECK_WARNING (CWE-190): [#def56]
capstone-5.0.1-build/capstone-5.0.1/tests/test_detail.c:174: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_MIPS32R6+CS_MODE_MICRO+CS_MODE_BIG_ENDIAN'.
#  172|   		{
#  173|   			CS_ARCH_MIPS,
#  174|-> 			(cs_mode)(CS_MODE_MIPS32R6 + CS_MODE_MICRO + CS_MODE_BIG_ENDIAN),
#  175|   			(unsigned char*)MIPS_32R6M,
#  176|   			sizeof(MIPS_32R6M) - 1,

Error: CPPCHECK_WARNING (CWE-190): [#def57]
capstone-5.0.1-build/capstone-5.0.1/tests/test_detail.c:181: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_MIPS32R6+CS_MODE_BIG_ENDIAN'.
#  179|   		{
#  180|   			CS_ARCH_MIPS,
#  181|-> 			(cs_mode)(CS_MODE_MIPS32R6 + CS_MODE_BIG_ENDIAN),
#  182|   			(unsigned char*)MIPS_32R6,
#  183|   			sizeof(MIPS_32R6) - 1,

Error: CPPCHECK_WARNING (CWE-190): [#def58]
capstone-5.0.1-build/capstone-5.0.1/tests/test_detail.c:206: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_BIG_ENDIAN+CS_MODE_QPX'.
#  204|   		{
#  205|   			CS_ARCH_PPC,
#  206|-> 			CS_MODE_BIG_ENDIAN + CS_MODE_QPX,
#  207|   			(unsigned char*)PPC_CODE2,
#  208|   			sizeof(PPC_CODE2) - 1,

Error: CPPCHECK_WARNING (CWE-190): [#def59]
capstone-5.0.1-build/capstone-5.0.1/tests/test_detail.c:222: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_BIG_ENDIAN+CS_MODE_V9'.
#  220|   		{
#  221|   			CS_ARCH_SPARC,
#  222|-> 			(cs_mode)(CS_MODE_BIG_ENDIAN + CS_MODE_V9),
#  223|   			(unsigned char*)SPARCV9_CODE,
#  224|   			sizeof(SPARCV9_CODE) - 1,

Error: CPPCHECK_WARNING: [#def60]
capstone-5.0.1-build/capstone-5.0.1/tests/test_evm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def61]
capstone-5.0.1-build/capstone-5.0.1/tests/test_iter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-190): [#def62]
capstone-5.0.1-build/capstone-5.0.1/tests/test_iter.c:148: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_MIPS32+CS_MODE_BIG_ENDIAN'.
#  146|   		{
#  147|   			CS_ARCH_MIPS,
#  148|-> 			(cs_mode)(CS_MODE_MIPS32 + CS_MODE_BIG_ENDIAN),
#  149|   			(unsigned char *)MIPS_CODE,
#  150|   			sizeof(MIPS_CODE) - 1,

Error: CPPCHECK_WARNING (CWE-190): [#def63]
capstone-5.0.1-build/capstone-5.0.1/tests/test_iter.c:189: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_BIG_ENDIAN+CS_MODE_V9'.
#  187|   		{
#  188|   			CS_ARCH_SPARC,
#  189|-> 			(cs_mode)(CS_MODE_BIG_ENDIAN + CS_MODE_V9),
#  190|   			(unsigned char*)SPARCV9_CODE,
#  191|   			sizeof(SPARCV9_CODE) - 1,

Error: CPPCHECK_WARNING: [#def64]
capstone-5.0.1-build/capstone-5.0.1/tests/test_m680x.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-190): [#def65]
capstone-5.0.1-build/capstone-5.0.1/tests/test_ppc.c:130: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_BIG_ENDIAN+CS_MODE_QPX'.
#  128|   		{
#  129|   			CS_ARCH_PPC,
#  130|-> 			(cs_mode)(CS_MODE_BIG_ENDIAN + CS_MODE_QPX),
#  131|   			(unsigned char*)PPC_CODE2,
#  132|   			sizeof(PPC_CODE2) - 1,

Error: CPPCHECK_WARNING (CWE-190): [#def66]
capstone-5.0.1-build/capstone-5.0.1/tests/test_ppc.c:137: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_BIG_ENDIAN+CS_MODE_PS'.
#  135|   		{
#  136|   			CS_ARCH_PPC,
#  137|-> 			(cs_mode)(CS_MODE_BIG_ENDIAN + CS_MODE_PS),
#  138|   			(unsigned char*)PPC_CODE3,
#  139|   			sizeof(PPC_CODE3) - 1,

Error: CPPCHECK_WARNING: [#def67]
capstone-5.0.1-build/capstone-5.0.1/tests/test_sh.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-704): [#def68]
capstone-5.0.1-build/capstone-5.0.1/tests/test_sh.c:66:9: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#   66 |         "Register indirect",
#      |         ^~~~~~~~~~~~~~~~~~~
#   64|   
#   65|   static char *reg_address_msg[] = {
#   66|-> 	"Register indirect",
#   67|   	"Register indirect with predecrement",
#   68|   	"Register indirect with postincrement",

Error: COMPILER_WARNING (CWE-704): [#def69]
capstone-5.0.1-build/capstone-5.0.1/tests/test_sh.c:67:9: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#   67 |         "Register indirect with predecrement",
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   65|   static char *reg_address_msg[] = {
#   66|   	"Register indirect",
#   67|-> 	"Register indirect with predecrement",
#   68|   	"Register indirect with postincrement",
#   69|   };

Error: COMPILER_WARNING (CWE-704): [#def70]
capstone-5.0.1-build/capstone-5.0.1/tests/test_sh.c:68:9: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#   68 |         "Register indirect with postincrement",
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   66|   	"Register indirect",
#   67|   	"Register indirect with predecrement",
#   68|-> 	"Register indirect with postincrement",
#   69|   };
#   70|   

Error: COMPILER_WARNING: [#def71]
capstone-5.0.1-build/capstone-5.0.1/tests/test_sh.c: scope_hint: In function ‘print_insn_detail’
capstone-5.0.1-build/capstone-5.0.1/tests/test_sh.c:99:72: warning[-Wformat=]: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long unsigned int’}
#   99 |                         printf("\t\toperands[%u].type: IMMEDIATE = #%llu\n", i,
#      |                                                                     ~~~^
#      |                                                                        |
#      |                                                                        long long unsigned int
#      |                                                                     %lu
#  100 |                                op->imm);
#      |                                ~~~~~~~                                  
#      |                                  |
#      |                                  uint64_t {aka long unsigned int}
#   97|   
#   98|   		case SH_OP_IMM:
#   99|-> 			printf("\t\toperands[%u].type: IMMEDIATE = #%llu\n", i,
#  100|   			       op->imm);
#  101|   			break;

Error: CPPCHECK_WARNING: [#def72]
capstone-5.0.1-build/capstone-5.0.1/tests/test_skipdata.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-190): [#def73]
capstone-5.0.1-build/capstone-5.0.1/tests/test_sparc.c:95: error[integerOverflow]: Signed integer overflow for expression 'CS_MODE_BIG_ENDIAN+CS_MODE_V9'.
#   93|   		{
#   94|   			CS_ARCH_SPARC,
#   95|-> 			(cs_mode)(CS_MODE_BIG_ENDIAN + CS_MODE_V9),
#   96|   			(unsigned char*)SPARCV9_CODE,
#   97|   			sizeof(SPARCV9_CODE) - 1,

Error: CPPCHECK_WARNING: [#def74]
capstone-5.0.1-build/capstone-5.0.1/tests/test_tms320c64x.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-704): [#def75]
capstone-5.0.1-build/capstone-5.0.1/tests/test_tricore.c: scope_hint: In function ‘test’
capstone-5.0.1-build/capstone-5.0.1/tests/test_tricore.c:85:25: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
#   85 |                         "TriCore",
#      |                         ^~~~~~~~~
#   83|   			(unsigned char *)TRICORE_CODE,
#   84|   			sizeof(TRICORE_CODE) - 1,
#   85|-> 			"TriCore",
#   86|   		},
#   87|   	};

Error: COMPILER_WARNING (CWE-704): [#def76]
capstone-5.0.1-build/capstone-5.0.1/tests/test_tricore.c:112:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘print_string_hex’ discards ‘const’ qualifier from pointer target type
#  112 |                         print_string_hex("Code:", platforms[i].code,
#      |                                          ^~~~~~~
capstone-5.0.1-build/capstone-5.0.1/tests/test_tricore.c:19:36: note: expected ‘char *’ but argument is of type ‘const char *’
#   19 | static void print_string_hex(char *comment, unsigned char *str, size_t len)
#      |                              ~~~~~~^~~~~~~
#  110|   			printf("****************\n");
#  111|   			printf("Platform: %s\n", platforms[i].comment);
#  112|-> 			print_string_hex("Code:", platforms[i].code,
#  113|   					 platforms[i].size);
#  114|   			printf("Disasm:\n");

Error: COMPILER_WARNING (CWE-704): [#def77]
capstone-5.0.1-build/capstone-5.0.1/tests/test_tricore.c:130:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘print_string_hex’ discards ‘const’ qualifier from pointer target type
#  130 |                         print_string_hex("Code:", platforms[i].code,
#      |                                          ^~~~~~~
capstone-5.0.1-build/capstone-5.0.1/tests/test_tricore.c:19:36: note: expected ‘char *’ but argument is of type ‘const char *’
#   19 | static void print_string_hex(char *comment, unsigned char *str, size_t len)
#      |                              ~~~~~~^~~~~~~
#  128|   			printf("****************\n");
#  129|   			printf("Platform: %s\n", platforms[i].comment);
#  130|-> 			print_string_hex("Code:", platforms[i].code,
#  131|   					 platforms[i].size);
#  132|   			printf("ERROR: Failed to disasm given code!\n");

Error: CPPCHECK_WARNING: [#def78]
capstone-5.0.1-build/capstone-5.0.1/tests/test_x86.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-223.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namecapstone-5.0.1-4.fc41
store-results-to/tmp/tmp7hchdpvt/capstone-5.0.1-4.fc41.tar.xz
time-created2024-07-03 12:09:19
time-finished2024-07-03 12:12:18
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp7hchdpvt/capstone-5.0.1-4.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp7hchdpvt/capstone-5.0.1-4.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9