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/libxvmc-1.0.12/src/XvMC.c Examining data/libxvmc-1.0.12/src/XvMClibint.h Examining data/libxvmc-1.0.12/include/X11/extensions/XvMClib.h Examining data/libxvmc-1.0.12/include/X11/extensions/vldXvMC.h Examining data/libxvmc-1.0.12/wrapper/XvMCWrapper.c FINAL RESULTS: data/libxvmc-1.0.12/include/X11/extensions/vldXvMC.h:141: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 intra_quantiser_matrix[64]; data/libxvmc-1.0.12/include/X11/extensions/vldXvMC.h:142: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 non_intra_quantiser_matrix[64]; data/libxvmc-1.0.12/include/X11/extensions/vldXvMC.h:143: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 chroma_intra_quantiser_matrix[64]; data/libxvmc-1.0.12/include/X11/extensions/vldXvMC.h:144: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 chroma_non_intra_quantiser_matrix[64]; data/libxvmc-1.0.12/src/XvMC.c:190:15: [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(&(ret[i].guid[0]), &(Info.guid[0]), 16); data/libxvmc-1.0.12/src/XvMC.c:207:15: [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(&(ret[i].component_order[0]), &(Info.comp_order[0]), 32); data/libxvmc-1.0.12/wrapper/XvMCWrapper.c:263: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 nameBuffer[BUFLEN]; data/libxvmc-1.0.12/wrapper/XvMCWrapper.c:316:15: [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). configFile = fopen(STRS(XVMC_CONFIGDIR) "/XvMCConfig","r"); data/libxvmc-1.0.12/src/XvMC.c:583:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(*name,tmpBuf,rep.nameLen); data/libxvmc-1.0.12/src/XvMC.c:585:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(*busID,tmpBuf+rep.nameLen,rep.busIDLen); data/libxvmc-1.0.12/wrapper/XvMCWrapper.c:215:12: [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). curLen = strlen(lib) + (verLen = strlen(version)) + 1; data/libxvmc-1.0.12/wrapper/XvMCWrapper.c:215:36: [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). curLen = strlen(lib) + (verLen = strlen(version)) + 1; data/libxvmc-1.0.12/wrapper/XvMCWrapper.c:217:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( curName, lib, curLen); data/libxvmc-1.0.12/wrapper/XvMCWrapper.c:220:7: [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( curName, version, tail - version); data/libxvmc-1.0.12/wrapper/XvMCWrapper.c:222:7: [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( curName, version, verLen); data/libxvmc-1.0.12/wrapper/XvMCWrapper.c:289: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). nameLen = strlen(clientName); data/libxvmc-1.0.12/wrapper/XvMCWrapper.c:303:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(nameBuffer,"lib",BUFLEN-1); data/libxvmc-1.0.12/wrapper/XvMCWrapper.c:304:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(nameBuffer+3, clientName, BUFLEN-4); data/libxvmc-1.0.12/wrapper/XvMCWrapper.c:305:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(nameBuffer + nameLen, ".so", BUFLEN-nameLen-1); data/libxvmc-1.0.12/wrapper/XvMCWrapper.c:336:13: [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 ((tmp = strlen(nameBuffer)) == 0) { ANALYSIS SUMMARY: Hits = 20 Lines analyzed = 1851 in approximately 0.05 seconds (35007 lines/second) Physical Source Lines of Code (SLOC) = 1380 Hits@level = [0] 13 [1] 12 [2] 8 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 33 [1+] 20 [2+] 8 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 23.913 [1+] 14.4928 [2+] 5.7971 [3+] 0 [4+] 0 [5+] 0 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.