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/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/AMD.h Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/MSR-Athlon.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/MSR-K6.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/bugs.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/dumppsb.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/identify.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/machine_check.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/powernow.h Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/revision.h Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/powernow.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Centaur/MSR-C3.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Centaur/centaur.h Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Centaur/identify.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Centaur/longhaul-v2.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Centaur/longhaul.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Centaur/powersaver.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Centaur/powersaver.h Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Cyrix/Cyrix.h Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Cyrix/identify.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/Intel.h Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/MSR-IDA.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/MSR-P4.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/MSR-P6.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/MSR-performance.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/MSR-thermal.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/cachesize.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/eblcr.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/identify-family15.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/identify-family6-extended.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/identify-family6.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/identify.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/info.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/machine_check.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/microcode.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/topology.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/NatSemi/identify.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/RiSE/identify.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/SiS/identify.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/apic.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/apic.h Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/bench/MHz.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/bench/bench.h Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/bench/benchmarks.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/bench/syscall.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/binary.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/commandline.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/connector.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/cpuid.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/features.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/get_model_name.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/havecpuid.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/identify.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/lsmsr.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/mptable.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/mptable.h Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/msr.h Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/mtrr.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/rdmsr.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/topology.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/x86info.c Examining data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/x86info.h FINAL RESULTS: data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/identify.c:38:5: [5] (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 high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(s, "/", CPU_NAME_LEN-1); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/identify.c:41:4: [5] (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 high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(s, p, CPU_NAME_LEN-1); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/bench/bench.h:19: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(y ": %ld cycles\n", ((bend-bstart)/NREPS)); \ data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/get_model_name.c:123:6: [4] (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). strcpy(cp, name); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/lsmsr.c:106:2: [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, "Usage: %s "_USAGE, g.prog); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/lsmsr.c:113:2: [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(stdout, "Usage: %s "_USAGE, g.prog); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/lsmsr.c:114:2: [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(stdout, "Help:\n"_HELP); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/lsmsr.c:340:13: [3] (buffer) getopt_long: 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((c = getopt_long(argc, argv, OPTSTRING, lopts, &li)) != -1) { data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/dumppsb.c:51:5: [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). fd=open("/dev/mem", O_RDONLY); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/AMD/identify.c:26: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[CPU_NAME_LEN]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/cachesize.c:180:17: [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 unsigned char unknown_array[256]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/info.c:32:7: [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. p += sprintf(p, "%04X", signature >> 16); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/info.c:33:7: [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. p += sprintf(p, "-%04X", signature & 0xffff); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/info.c:34:7: [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. p += sprintf(p, "-%04X", edx >> 16); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/info.c:35:7: [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. p += sprintf(p, "-%04X", edx & 0xffff); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/info.c:36:7: [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. p += sprintf(p, "-%04X", ecx >> 16); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/info.c:37:7: [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. p += sprintf(p, "-%04X\n", ecx & 0xffff); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/apic.c:66:12: [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). if ((fd = open("/dev/mem", O_RDONLY)) == -1) data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/cpuid.c:66: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(&tmp_set, &set, sizeof(cpu_set_t)); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/cpuid.c:106: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 cpuname[20]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/cpuid.c:107: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 buffer[16]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/cpuid.c:120:7: [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). fh = open(cpuname, O_RDONLY); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/cpuid.c:160: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 cpuname[20]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/cpuid.c:161: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 buffer[CPUID_CHUNK_SIZE]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/cpuid.c:185:7: [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). fh = open(cpuname, O_RDONLY); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/get_model_name.c:17: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 namestring[49], *cp; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/lsmsr.c:149: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[20]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/lsmsr.c:152:9: [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). g.fd = open(s, O_RDONLY); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/mptable.c:80: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 name[32]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/mptable.c:94: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 signature[4]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/mptable.c:108: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 signature[4]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/mptable.c:410:13: [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). if ((pfd = open("/dev/mem", O_RDONLY)) < 0) { data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/mptable.c:443:13: [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). if ((pfd = open("/dev/mem", O_RDONLY)) < 0) { data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/mtrr.c:28: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 * mtrr_types[MTRR_NUM_TYPES] = data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/rdmsr.c:29: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 cpuname[16]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/rdmsr.c:30: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 buffer[8]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/rdmsr.c:41:7: [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). fh = open(cpuname, O_RDONLY); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/rdmsr.c:71: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 cpuname[16]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/rdmsr.c:72: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 buffer[8]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/rdmsr.c:83:7: [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). fh = open(cpuname, O_RDONLY); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/x86info.h:85: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 name[CPU_NAME_LEN]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/x86info.h:100: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 serialno[30]; data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/identify.c:131:20: [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). intel_nameptr += strlen(cpu->name); // EWW data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/Intel/identify.c:140:20: [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). intel_nameptr += strlen(cpu->name); // EWW data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/cpuid.c:190:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fh, &buffer[0], CPUID_CHUNK_SIZE) == -1) { data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/lsmsr.c:134:8: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). off = read(g.fd, val, 8); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/lsmsr.c:181:6: [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). t = strlen(name); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/lsmsr.c:187:7: [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). t = strlen(g.msr_table[i].name); data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/lsmsr.c:385:7: [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(argv[optind]) >= OPT_MAX) { data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/mptable.c:145:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pfd, entry, size) != size) { data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/mptable.c:156:6: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(pfd, &type, sizeof(unsigned char)) != sizeof(unsigned char)) { data/x86info-1.31~pre0.8052aabdd159bc9050e7dc264f33782c5acce05f/rdmsr.c:96:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fh, &buffer[0], 8) != 8) { ANALYSIS SUMMARY: Hits = 52 Lines analyzed = 8965 in approximately 0.26 seconds (34883 lines/second) Physical Source Lines of Code (SLOC) = 6570 Hits@level = [0] 653 [1] 10 [2] 34 [3] 1 [4] 5 [5] 2 Hits@level+ = [0+] 705 [1+] 52 [2+] 42 [3+] 8 [4+] 7 [5+] 2 Hits/KSLOC@level+ = [0+] 107.306 [1+] 7.91476 [2+] 6.39269 [3+] 1.21766 [4+] 1.06545 [5+] 0.304414 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.