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/kmscube-0.0.0~git20170617/common.c Examining data/kmscube-0.0.0~git20170617/common.h Examining data/kmscube-0.0.0~git20170617/cube-smooth.c Examining data/kmscube-0.0.0~git20170617/cube-tex.c Examining data/kmscube-0.0.0~git20170617/cube-video.c Examining data/kmscube-0.0.0~git20170617/drm-atomic.c Examining data/kmscube-0.0.0~git20170617/drm-common.c Examining data/kmscube-0.0.0~git20170617/drm-common.h Examining data/kmscube-0.0.0~git20170617/drm-legacy.c Examining data/kmscube-0.0.0~git20170617/esTransform.c Examining data/kmscube-0.0.0~git20170617/esUtil.h Examining data/kmscube-0.0.0~git20170617/frame-512x512-NV12.c Examining data/kmscube-0.0.0~git20170617/frame-512x512-RGBA.c Examining data/kmscube-0.0.0~git20170617/gst-decoder.c Examining data/kmscube-0.0.0~git20170617/kmscube.c FINAL RESULTS: data/kmscube-0.0.0~git20170617/cube-tex.c:235:3: [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(&map[stride * i], &src[texw * 4 * i], texw * 4); data/kmscube-0.0.0~git20170617/cube-tex.c:270:3: [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(&map[stride * i], &src[texw * i], texw); data/kmscube-0.0.0~git20170617/cube-tex.c:305:3: [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(&map[stride * i], &src[texw * i], texw); data/kmscube-0.0.0~git20170617/cube-video.c:51: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. const char *filenames[32]; data/kmscube-0.0.0~git20170617/drm-common.c:104:3: [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(handles, (uint32_t [4]){gbm_bo_get_handle(bo).u32,0,0,0}, 16); data/kmscube-0.0.0~git20170617/drm-common.c:105:3: [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(strides, (uint32_t [4]){gbm_bo_get_stride(bo),0,0,0}, 16); data/kmscube-0.0.0~git20170617/drm-common.c:170: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). drm->fd = open(device, O_RDWR); data/kmscube-0.0.0~git20170617/esTransform.c:222:5: [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(result, &tmp, sizeof(ESMatrix)); data/kmscube-0.0.0~git20170617/gst-decoder.c:349: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(map, ptr, size); data/kmscube-0.0.0~git20170617/common.c:81: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). int len = strlen(ext); ANALYSIS SUMMARY: Hits = 10 Lines analyzed = 49070 in approximately 3.41 seconds (14396 lines/second) Physical Source Lines of Code (SLOC) = 47721 Hits@level = [0] 78 [1] 1 [2] 9 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 88 [1+] 10 [2+] 9 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 1.84405 [1+] 0.209551 [2+] 0.188596 [3+] 0 [4+] 0 [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.