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/compton-0.1~beta2+20150922/src/c2.c Examining data/compton-0.1~beta2+20150922/src/c2.h Examining data/compton-0.1~beta2+20150922/src/common.h Examining data/compton-0.1~beta2+20150922/src/compton.c Examining data/compton-0.1~beta2+20150922/src/compton.h Examining data/compton-0.1~beta2+20150922/src/dbus.c Examining data/compton-0.1~beta2+20150922/src/dbus.h Examining data/compton-0.1~beta2+20150922/src/opengl.c Examining data/compton-0.1~beta2+20150922/src/opengl.h Examining data/compton-0.1~beta2+20150922/src/xrescheck.c Examining data/compton-0.1~beta2+20150922/src/xrescheck.h FINAL RESULTS: data/compton-0.1~beta2+20150922/src/common.h:164:3: [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, format "\n", ## __VA_ARGS__) data/compton-0.1~beta2+20150922/src/common.h:179: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(format, ## __VA_ARGS__); \ data/compton-0.1~beta2+20150922/src/common.h:1526:3: [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(str, src); data/compton-0.1~beta2+20150922/src/common.h:1551:3: [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(str, src1); data/compton-0.1~beta2+20150922/src/common.h:1552:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, src2); data/compton-0.1~beta2+20150922/src/common.h:1565:3: [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(str, src1); data/compton-0.1~beta2+20150922/src/common.h:1566:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, src2); data/compton-0.1~beta2+20150922/src/common.h:1567:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, src3); data/compton-0.1~beta2+20150922/src/common.h:1580:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(*psrc1, src2); data/compton-0.1~beta2+20150922/src/common.h:2350:5: [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(str, func); data/compton-0.1~beta2+20150922/src/common.h:2351:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str + strlen(str), "(%#010lx)%s", xid, postfix); data/compton-0.1~beta2+20150922/src/compton.c:4902:5: [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(buf, len, REGISTER_PROP "%d", ps->scr); data/compton-0.1~beta2+20150922/src/opengl.c:462:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(pc, FRAG_SHADER_BLUR_PREFIX, extension, sampler_type); data/compton-0.1~beta2+20150922/src/opengl.c:475:15: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(pc, shader_add, val, texture_func, k - wid / 2, j - hei / 2); data/compton-0.1~beta2+20150922/src/opengl.c:481:11: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf(pc, FRAG_SHADER_BLUR_SUFFIX, texture_func, sum); data/compton-0.1~beta2+20150922/src/compton.c:5327:16: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!((dir = getenv("XDG_CONFIG_HOME")) && strlen(dir))) { data/compton-0.1~beta2+20150922/src/compton.c:5328:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!((home = getenv("HOME")) && strlen(home))) data/compton-0.1~beta2+20150922/src/compton.c:5346:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((home = getenv("HOME")) && strlen(home)) { data/compton-0.1~beta2+20150922/src/compton.c:5358:14: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((dir = getenv("XDG_CONFIG_DIRS")) && strlen(dir)) { data/compton-0.1~beta2+20150922/src/compton.c:5774:14: [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. (o = getopt_long(argc, argv, shortopts, longopts, &longopt_idx))) { data/compton-0.1~beta2+20150922/src/compton.c:5826:12: [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. (o = getopt_long(argc, argv, shortopts, longopts, &longopt_idx))) { data/compton-0.1~beta2+20150922/src/c2.c:43: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(plptr, &lptr_def, sizeof(c2_lptr_t)); data/compton-0.1~beta2+20150922/src/c2.c:271: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(pleaf, &leaf_def, sizeof(c2_l_t)); data/compton-0.1~beta2+20150922/src/c2.c:668: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(pleaf, &leaf_def, sizeof(c2_l_t)); data/compton-0.1~beta2+20150922/src/c2.h:249: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(pp, &C2_PTR_NULL, sizeof(c2_ptr_t)); data/compton-0.1~beta2+20150922/src/common.h:1263: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. extern const char * const WINTYPES[NUM_WINTYPES]; data/compton-0.1~beta2+20150922/src/common.h:1264: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. extern const char * const VSYNC_STRS[NUM_VSYNC + 1]; data/compton-0.1~beta2+20150922/src/common.h:1265: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. extern const char * const BACKEND_STRS[NUM_BKEND + 1]; data/compton-0.1~beta2+20150922/src/common.h:1819: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(key, ps->key, sizeof(fd_set)); \ data/compton-0.1~beta2+20150922/src/common.h:2516: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). FILE *f = fopen(path, "wb"); data/compton-0.1~beta2+20150922/src/compton.c:17:7: [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 * const WINTYPES[NUM_WINTYPES] = { data/compton-0.1~beta2+20150922/src/compton.c:36:7: [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 * const VSYNC_STRS[NUM_VSYNC + 1] = { data/compton-0.1~beta2+20150922/src/compton.c:47:7: [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 * const BACKEND_STRS[NUM_BKEND + 1] = { data/compton-0.1~beta2+20150922/src/compton.c:1484:11: [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(kern_dst, kern_src, (kwid * khei + 2) * sizeof(XFixed)); data/compton-0.1~beta2+20150922/src/compton.c:2938: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(new, &win_def, sizeof(win)); data/compton-0.1~beta2+20150922/src/compton.c:3398: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[BUF_LEN] = ""; data/compton-0.1~beta2+20150922/src/compton.c:3895:10: [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 buf[128]; data/compton-0.1~beta2+20150922/src/compton.c:3927:3: [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. sprintf(buf, "Event %d", ev->type); data/compton-0.1~beta2+20150922/src/compton.c:4982: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). FILE *f = fopen(ps->o.write_pid_path, "w"); data/compton-0.1~beta2+20150922/src/compton.c:5320:9: [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). f = fopen(path, "r"); data/compton-0.1~beta2+20150922/src/compton.c:5336:7: [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). f = fopen(path, "r"); data/compton-0.1~beta2+20150922/src/compton.c:5348:9: [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). f = fopen(path, "r"); data/compton-0.1~beta2+20150922/src/compton.c:5362:11: [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). f = fopen(path, "r"); data/compton-0.1~beta2+20150922/src/compton.c:5374:9: [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). f = fopen(path, "r"); data/compton-0.1~beta2+20150922/src/compton.c:6113: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(ps->o.blur_kerns[0], &convolution_blur, sizeof(convolution_blur)); data/compton-0.1~beta2+20150922/src/compton.c:6257:39: [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 (ps->drm_fd < 0 && (ps->drm_fd = open("/dev/dri/card0", O_RDWR)) < 0) { data/compton-0.1~beta2+20150922/src/compton.c:6691: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(ptmout, &tmout_def, sizeof(timeout_t)); data/compton-0.1~beta2+20150922/src/compton.c:7139: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(ps, &s_def, sizeof(session_t)); data/compton-0.1~beta2+20150922/src/opengl.c:105: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(ps->psglx, &CGLX_SESSION_DEF, sizeof(glx_session_t)); data/compton-0.1~beta2+20150922/src/opengl.c:756: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(ptex, &GLX_TEX_DEF, sizeof(glx_texture_t)); data/compton-0.1~beta2+20150922/src/opengl.c:1808: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 log[log_len + 1]; data/compton-0.1~beta2+20150922/src/opengl.c:1849: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 log[log_len + 1]; data/compton-0.1~beta2+20150922/src/c2.c:26: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(pattern) >= 2 && ':' == pattern[1]) data/compton-0.1~beta2+20150922/src/c2.c:533:15: [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). offset += strlen("true"); data/compton-0.1~beta2+20150922/src/c2.c:538:15: [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). offset += strlen("false"); data/compton-0.1~beta2+20150922/src/c2.c:575:29: [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). char *tptnstr = malloc((strlen(pattern + offset) + 1) * sizeof(char)); data/compton-0.1~beta2+20150922/src/c2.c:656:19: [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). unsigned plen = strlen(pattern + offset); data/compton-0.1~beta2+20150922/src/c2.c:1169:23: [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(pleaf->ptnstr)); data/compton-0.1~beta2+20150922/src/c2.c:1172:23: [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(pleaf->ptnstr)); data/compton-0.1~beta2+20150922/src/c2.c:1186:28: [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). tgt, strlen(tgt), 0, 0, NULL, 0) >= 0); data/compton-0.1~beta2+20150922/src/c2.h:217:46: [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). #define mstrncmp(s1, s2) strncmp((s1), (s2), strlen(s1)) data/compton-0.1~beta2+20150922/src/c2.h:228: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). char c = src[strlen(needle)]; data/compton-0.1~beta2+20150922/src/common.h:1524:23: [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). char *str = cmalloc(strlen(src) + 1, char); data/compton-0.1~beta2+20150922/src/common.h:1538:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(str, src, len); data/compton-0.1~beta2+20150922/src/common.h:1549:23: [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). char *str = cmalloc(strlen(src1) + strlen(src2) + 1, char); data/compton-0.1~beta2+20150922/src/common.h:1549:38: [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). char *str = cmalloc(strlen(src1) + strlen(src2) + 1, char); data/compton-0.1~beta2+20150922/src/common.h:1562:23: [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). char *str = cmalloc(strlen(src1) + strlen(src2) data/compton-0.1~beta2+20150922/src/common.h:1562:38: [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). char *str = cmalloc(strlen(src1) + strlen(src2) data/compton-0.1~beta2+20150922/src/common.h:1563: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). + strlen(src3) + 1, char); data/compton-0.1~beta2+20150922/src/common.h:1577:39: [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). *psrc1 = crealloc(*psrc1, (*psrc1 ? strlen(*psrc1): 0) + strlen(src2) + 1, data/compton-0.1~beta2+20150922/src/common.h:1577:60: [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). *psrc1 = crealloc(*psrc1, (*psrc1 ? strlen(*psrc1): 0) + strlen(src2) + 1, data/compton-0.1~beta2+20150922/src/common.h:2348:25: [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). char *str = malloc((strlen(func) + 12 + 2 data/compton-0.1~beta2+20150922/src/common.h:2349: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). + strlen(postfix) + 5) * sizeof(char)); data/compton-0.1~beta2+20150922/src/common.h:2351:19: [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). sprintf(str + strlen(str), "(%#010lx)%s", xid, postfix); data/compton-0.1~beta2+20150922/src/common.h:2352:38: [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). ps->psglx->glStringMarkerGREMEDY(strlen(str), str); data/compton-0.1~beta2+20150922/src/compton.c:4893: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). unsigned len = strlen(REGISTER_PROP) + 2; data/compton-0.1~beta2+20150922/src/compton.c:5327:46: [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 (!((dir = getenv("XDG_CONFIG_HOME")) && strlen(dir))) { data/compton-0.1~beta2+20150922/src/compton.c:5328:38: [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 (!((home = getenv("HOME")) && strlen(home))) data/compton-0.1~beta2+20150922/src/compton.c:5346:34: [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 ((home = getenv("HOME")) && strlen(home)) { data/compton-0.1~beta2+20150922/src/compton.c:5358:44: [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 ((dir = getenv("XDG_CONFIG_DIRS")) && strlen(dir)) { data/compton-0.1~beta2+20150922/src/opengl.c:454:19: [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(FRAG_SHADER_BLUR_PREFIX) + strlen(sampler_type) + strlen(extension) + (strlen(shader_add) + strlen(texture_func) + 42) * nele + strlen(FRAG_SHADER_BLUR_SUFFIX) + strlen(texture_func) + 12 + 1; data/compton-0.1~beta2+20150922/src/opengl.c:454:53: [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(FRAG_SHADER_BLUR_PREFIX) + strlen(sampler_type) + strlen(extension) + (strlen(shader_add) + strlen(texture_func) + 42) * nele + strlen(FRAG_SHADER_BLUR_SUFFIX) + strlen(texture_func) + 12 + 1; data/compton-0.1~beta2+20150922/src/opengl.c:454:76: [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(FRAG_SHADER_BLUR_PREFIX) + strlen(sampler_type) + strlen(extension) + (strlen(shader_add) + strlen(texture_func) + 42) * nele + strlen(FRAG_SHADER_BLUR_SUFFIX) + strlen(texture_func) + 12 + 1; data/compton-0.1~beta2+20150922/src/opengl.c:454:97: [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(FRAG_SHADER_BLUR_PREFIX) + strlen(sampler_type) + strlen(extension) + (strlen(shader_add) + strlen(texture_func) + 42) * nele + strlen(FRAG_SHADER_BLUR_SUFFIX) + strlen(texture_func) + 12 + 1; data/compton-0.1~beta2+20150922/src/opengl.c:454:118: [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(FRAG_SHADER_BLUR_PREFIX) + strlen(sampler_type) + strlen(extension) + (strlen(shader_add) + strlen(texture_func) + 42) * nele + strlen(FRAG_SHADER_BLUR_SUFFIX) + strlen(texture_func) + 12 + 1; data/compton-0.1~beta2+20150922/src/opengl.c:454:154: [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(FRAG_SHADER_BLUR_PREFIX) + strlen(sampler_type) + strlen(extension) + (strlen(shader_add) + strlen(texture_func) + 42) * nele + strlen(FRAG_SHADER_BLUR_SUFFIX) + strlen(texture_func) + 12 + 1; data/compton-0.1~beta2+20150922/src/opengl.c:454:188: [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(FRAG_SHADER_BLUR_PREFIX) + strlen(sampler_type) + strlen(extension) + (strlen(shader_add) + strlen(texture_func) + 42) * nele + strlen(FRAG_SHADER_BLUR_SUFFIX) + strlen(texture_func) + 12 + 1; data/compton-0.1~beta2+20150922/src/opengl.c:463: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). pc += strlen(pc); data/compton-0.1~beta2+20150922/src/opengl.c:464: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). assert(strlen(shader_str) < len); data/compton-0.1~beta2+20150922/src/opengl.c:476:21: [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). pc += strlen(pc); data/compton-0.1~beta2+20150922/src/opengl.c:477:22: [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). assert(strlen(shader_str) < len); data/compton-0.1~beta2+20150922/src/opengl.c:482: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). assert(strlen(shader_str) < len); data/compton-0.1~beta2+20150922/src/opengl.h:80: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). || (strlen(pos) > strlen(needle) && !isspace(pos[strlen(needle)]))) data/compton-0.1~beta2+20150922/src/opengl.h:80:27: [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(pos) > strlen(needle) && !isspace(pos[strlen(needle)]))) data/compton-0.1~beta2+20150922/src/opengl.h:80:58: [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(pos) > strlen(needle) && !isspace(pos[strlen(needle)]))) ANALYSIS SUMMARY: Hits = 95 Lines analyzed = 17024 in approximately 0.40 seconds (42845 lines/second) Physical Source Lines of Code (SLOC) = 11619 Hits@level = [0] 47 [1] 43 [2] 31 [3] 6 [4] 15 [5] 0 Hits@level+ = [0+] 142 [1+] 95 [2+] 52 [3+] 21 [4+] 15 [5+] 0 Hits/KSLOC@level+ = [0+] 12.2214 [1+] 8.17626 [2+] 4.47543 [3+] 1.80738 [4+] 1.29099 [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.