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/compiz-0.8.18/include/compiz.h Examining data/compiz-0.8.18/include/compiz-core.h Examining data/compiz-0.8.18/include/compiz-cube.h Examining data/compiz-0.8.18/include/decoration.h Examining data/compiz-0.8.18/include/compiz-scale.h Examining data/compiz-0.8.18/include/compiz-plugin.h Examining data/compiz-0.8.18/plugins/wall_options.h Examining data/compiz-0.8.18/plugins/zoom.c Examining data/compiz-0.8.18/plugins/obs.c Examining data/compiz-0.8.18/plugins/regex.c Examining data/compiz-0.8.18/plugins/water.c Examining data/compiz-0.8.18/plugins/cube.c Examining data/compiz-0.8.18/plugins/move.c Examining data/compiz-0.8.18/plugins/wobbly.c Examining data/compiz-0.8.18/plugins/clone.c Examining data/compiz-0.8.18/plugins/inotify.c Examining data/compiz-0.8.18/plugins/place.c Examining data/compiz-0.8.18/plugins/ini.c Examining data/compiz-0.8.18/plugins/dbus.c Examining data/compiz-0.8.18/plugins/glib.c Examining data/compiz-0.8.18/plugins/minimize.c Examining data/compiz-0.8.18/plugins/switcher.c Examining data/compiz-0.8.18/plugins/wall_options.c Examining data/compiz-0.8.18/plugins/scale.c Examining data/compiz-0.8.18/plugins/decoration.c Examining data/compiz-0.8.18/plugins/wall.c Examining data/compiz-0.8.18/plugins/rotate.c Examining data/compiz-0.8.18/plugins/png.c Examining data/compiz-0.8.18/plugins/fuse.c Examining data/compiz-0.8.18/plugins/commands.c Examining data/compiz-0.8.18/plugins/svg.c Examining data/compiz-0.8.18/plugins/resize.c Examining data/compiz-0.8.18/plugins/matecompat.c Examining data/compiz-0.8.18/plugins/blur.c Examining data/compiz-0.8.18/plugins/screenshot.c Examining data/compiz-0.8.18/plugins/annotate.c Examining data/compiz-0.8.18/plugins/fade.c Examining data/compiz-0.8.18/gtk-window-decorator/gtk-window-decorator.c Examining data/compiz-0.8.18/libdecoration/decoration.c Examining data/compiz-0.8.18/src/privates.c Examining data/compiz-0.8.18/src/display.c Examining data/compiz-0.8.18/src/fragment.c Examining data/compiz-0.8.18/src/screen.c Examining data/compiz-0.8.18/src/matrix.c Examining data/compiz-0.8.18/src/event.c Examining data/compiz-0.8.18/src/metadata.c Examining data/compiz-0.8.18/src/window.c Examining data/compiz-0.8.18/src/main.c Examining data/compiz-0.8.18/src/session.c Examining data/compiz-0.8.18/src/option.c Examining data/compiz-0.8.18/src/match.c Examining data/compiz-0.8.18/src/paint.c Examining data/compiz-0.8.18/src/plugin.c Examining data/compiz-0.8.18/src/texture.c Examining data/compiz-0.8.18/src/cursor.c Examining data/compiz-0.8.18/src/core.c Examining data/compiz-0.8.18/src/object.c FINAL RESULTS: data/compiz-0.8.18/plugins/blur.c:1485:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. str += sprintf (str, data/compiz-0.8.18/plugins/blur.c:1508:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. str += sprintf (str, data/compiz-0.8.18/plugins/blur.c:1515:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. str += sprintf (str, data/compiz-0.8.18/plugins/dbus.c:1759:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "Plugin '%s' could not be loaded", name); data/compiz-0.8.18/plugins/dbus.c:1951:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (path, "%s/%s/%s%s/%s", COMPIZ_DBUS_ROOT_PATH, data/compiz-0.8.18/plugins/dbus.c:1957:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (path, "%s/%s/%s/%s", COMPIZ_DBUS_ROOT_PATH, data/compiz-0.8.18/plugins/dbus.c:2465:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (plugindir, "%s/%s", home, HOME_PLUGINDIR); data/compiz-0.8.18/plugins/ini.c:238:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (tmp, "%s/%s", home, HOME_OPTIONDIR); data/compiz-0.8.18/plugins/ini.c:282:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (fn, "%s-%s%s", data/compiz-0.8.18/plugins/ini.c:635:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (fullPath, "%s/%s", directory, filename); data/compiz-0.8.18/plugins/ini.c:789:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(fullPath, "%s/%s", directory, filename); data/compiz-0.8.18/plugins/png.c:366:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (file, "%s/%s%s", path, name, extension); data/compiz-0.8.18/plugins/png.c:368:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (file, "%s%s", name, extension); data/compiz-0.8.18/plugins/png.c:432:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (file, "%s/%s%s", path, name, extension); data/compiz-0.8.18/plugins/png.c:434:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (file, "%s%s", name, extension); data/compiz-0.8.18/plugins/screenshot.c:279: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 (desktopDir, home); data/compiz-0.8.18/plugins/screenshot.c:384:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (command, "%s %s/%s", app, dir, name); data/compiz-0.8.18/plugins/svg.c:742:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (file, "%s/%s%s", path, name, extension); data/compiz-0.8.18/plugins/svg.c:744:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (file, "%s%s", name, extension); data/compiz-0.8.18/plugins/water.c:244:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buffer, waterFpString, data/compiz-0.8.18/plugins/water.c:250:2: [4] (format) sprintf: Potential format string problem (CWE-134). Make format string constant. sprintf (buffer, waterFpString, data/compiz-0.8.18/plugins/water.c:299:2: [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 (str, 1024, data/compiz-0.8.18/plugins/water.c:336:2: [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 (str, 1024, data/compiz-0.8.18/plugins/water.c:355:2: [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 (str, 1024, data/compiz-0.8.18/src/display.c:2048:5: [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, str, e->request_code); data/compiz-0.8.18/src/display.c:2057:5: [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, str, e->minor_code); data/compiz-0.8.18/src/display.c:2061:5: [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, str, e->resourceid); data/compiz-0.8.18/src/display.c:3197:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (path, "%s/%s", home, HOME_IMAGEDIR); data/compiz-0.8.18/src/fragment.c:528: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 + oldSize, data); data/compiz-0.8.18/src/fragment.c:550:2: [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 + oldSize, op->data); data/compiz-0.8.18/src/fragment.c:824: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 (dst, prefix); data/compiz-0.8.18/src/fragment.c:827: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 (dst, header[index].name); data/compiz-0.8.18/src/fragment.c:834: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 (dst, haystack); data/compiz-0.8.18/src/fragment.c:1061:6: [4] (format) vsnprintf: 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. n = vsnprintf (fStr, size, str, ap); data/compiz-0.8.18/src/fragment.c:1115:6: [4] (format) vsnprintf: 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. n = vsnprintf (fStr, size, str, ap); data/compiz-0.8.18/src/fragment.c:1173:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (nameBuffer, "%s%d", name, i++); data/compiz-0.8.18/src/fragment.c:1315:6: [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 (str, 1024, saturateData, param, param); data/compiz-0.8.18/src/main.c:118:5: [4] (format) vsnprintf: 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. vsnprintf (message, 2048, format, args); data/compiz-0.8.18/src/main.c:172:14: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. else if (access ("/usr/bin/xfwm4", F_OK) == 0) data/compiz-0.8.18/src/main.c:174:14: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. else if (access ("/usr/bin/icewm", F_OK) == 0) data/compiz-0.8.18/src/main.c:179:2: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp (fallback, fallback, "--replace", (char *)NULL); data/compiz-0.8.18/src/main.c:181:2: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp ("xterm", "xterm", (char *)NULL); data/compiz-0.8.18/src/main.c:329:6: [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 (PACKAGE_STRING "\n"); data/compiz-0.8.18/src/main.c:440:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (ctx.refreshRateData, data/compiz-0.8.18/src/main.c:460:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. ptr += sprintf (ptr, "<value>%s</value>", plugin[i]); data/compiz-0.8.18/src/main.c:539:2: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp (programName, programArgv); data/compiz-0.8.18/src/match.c:491:7: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (value, "%s%s(%s)%s", !str ? "" : data/compiz-0.8.18/src/match.c:503:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (value, "%s%s%s%s", !str ? "" : data/compiz-0.8.18/src/metadata.c:101:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (file, "%s/%s%s", path, name, EXTENSION); data/compiz-0.8.18/src/metadata.c:103:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (file, "%s%s", name, EXTENSION); data/compiz-0.8.18/src/metadata.c:160:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (path, "%s/%s", home, HOME_METADATADIR); data/compiz-0.8.18/src/metadata.c:1115:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "/compiz/%s/screen//option[@name=\"%s\"]", m->path, name); data/compiz-0.8.18/src/metadata.c:1210:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "/compiz/%s/display//option[@name=\"%s\"]", m->path, name); data/compiz-0.8.18/src/metadata.c:1340:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "/compiz/%s/short/child::text()", m->path); data/compiz-0.8.18/src/metadata.c:1350:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "/compiz/%s/long/child::text()", m->path); data/compiz-0.8.18/src/metadata.c:1361:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "/compiz/%s/screen//option[@name=\"%s\"]/short/child::text()", data/compiz-0.8.18/src/metadata.c:1373:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "/compiz/%s/screen//option[@name=\"%s\"]/long/child::text()", data/compiz-0.8.18/src/metadata.c:1386:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, data/compiz-0.8.18/src/metadata.c:1400:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (str, "/compiz/%s/display//option[@name=\"%s\"]/long/child::text()", data/compiz-0.8.18/src/option.c:553:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (r, "%s%s", s, a); data/compiz-0.8.18/src/option.c:558:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (r, "%s", a); data/compiz-0.8.18/src/plugin.c:166:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (file, "%s/lib%s.so", path, name); data/compiz-0.8.18/src/plugin.c:168:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (file, "lib%s.so", name); data/compiz-0.8.18/src/plugin.c:573:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (plugindir, "%s/%s", home, HOME_PLUGINDIR); data/compiz-0.8.18/src/plugin.c:674:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf (plugindir, "%s/%s", home, HOME_PLUGINDIR); data/compiz-0.8.18/src/screen.c:2026:6: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execvp (programName, copy); data/compiz-0.8.18/src/screen.c:3689:2: [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 (screenString, s->display->displayString); data/compiz-0.8.18/src/screen.c:3710:8: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. exit (execl ("/bin/sh", "/bin/sh", "-c", command, NULL)); data/compiz-0.8.18/plugins/dbus.c:2459:12: [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. home = getenv ("HOME"); data/compiz-0.8.18/plugins/ini.c:232:12: [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. home = getenv ("HOME"); data/compiz-0.8.18/plugins/screenshot.c:205:18: [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. char *home = getenv ("HOME"); data/compiz-0.8.18/plugins/screenshot.c:213:24: [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. char *configHome = getenv ("XDG_CONFIG_HOME"); data/compiz-0.8.18/plugins/wobbly.c:1015:42: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. model->objects[i].vertEdge.velocity *= drand48 () * 0.25f; data/compiz-0.8.18/plugins/wobbly.c:1018:42: [3] (random) drand48: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. model->objects[i].horzEdge.velocity *= drand48 () * 0.25f; data/compiz-0.8.18/src/display.c:3189:9: [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. home = getenv ("HOME"); data/compiz-0.8.18/src/main.c:166:21: [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. char *desktop = getenv ("XDG_CURRENT_DESKTOP"); data/compiz-0.8.18/src/main.c:510:35: [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. char *desktop_autostart_id = getenv ("DESKTOP_AUTOSTART_ID"); data/compiz-0.8.18/src/metadata.c:152:12: [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. home = getenv ("HOME"); data/compiz-0.8.18/src/plugin.c:567:12: [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. home = getenv ("HOME"); data/compiz-0.8.18/src/plugin.c:668:12: [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. home = getenv ("HOME"); data/compiz-0.8.18/src/screen.c:2127:10: [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 (!getenv ("SKIP_CHECKS") || strcmp (getenv ("SKIP_CHECKS"), "yes") != 0) data/compiz-0.8.18/src/screen.c:2127:44: [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 (!getenv ("SKIP_CHECKS") || strcmp (getenv ("SKIP_CHECKS"), "yes") != 0) data/compiz-0.8.18/src/session.c:250:9: [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 (getenv ("SESSION_MANAGER")) data/compiz-0.8.18/src/texture.c:247:11: [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 ((!getenv ("SKIP_CHECKS") || strcmp (getenv ("SKIP_CHECKS"), "yes") != 0) data/compiz-0.8.18/src/texture.c:247:45: [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 ((!getenv ("SKIP_CHECKS") || strcmp (getenv ("SKIP_CHECKS"), "yes") != 0) data/compiz-0.8.18/gtk-window-decorator/gtk-window-decorator.c:3650:6: [2] (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). Risk is low because the source is a constant string. strcpy (d->name + name_length - 3, "..."); data/compiz-0.8.18/gtk-window-decorator/gtk-window-decorator.c:4089:4: [2] (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). Risk is low because the source is a constant string. strcpy (d->name + name_length - 3, "..."); data/compiz-0.8.18/gtk-window-decorator/gtk-window-decorator.c:6100: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 (opt.shadow_color, shadow_color, sizeof (shadow_color)); data/compiz-0.8.18/include/compiz-core.h:1054: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 displayString[256]; data/compiz-0.8.18/libdecoration/decoration.c:176: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 (data++, &pixmap, sizeof (Pixmap)); data/compiz-0.8.18/libdecoration/decoration.c:311: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 (pixmap, data++, sizeof (Pixmap)); data/compiz-0.8.18/libdecoration/decoration.c:2789: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[128]; data/compiz-0.8.18/libdecoration/decoration.c:2796:5: [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, "_COMPIZ_DM_S%d", screen); data/compiz-0.8.18/libdecoration/decoration.c:3065: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[128]; data/compiz-0.8.18/libdecoration/decoration.c:3067:5: [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, "_COMPIZ_DM_S%d", screen); data/compiz-0.8.18/plugins/blur.c:1035: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 str[1024]; data/compiz-0.8.18/plugins/blur.c:1130: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 str[1024]; data/compiz-0.8.18/plugins/blur.c:1443: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 buffer[4096]; data/compiz-0.8.18/plugins/blur.c:1458:12: [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. str += sprintf (str, data/compiz-0.8.18/plugins/blur.c:1480:9: [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. str += sprintf (str,"TEMP pix_%d, pix_%d;", i * 2, (i * 2) + 1); data/compiz-0.8.18/plugins/blur.c:1483:9: [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. str += sprintf (str,"TEMP coord_%d, coord_%d;", i * 2, (i * 2) + 1); data/compiz-0.8.18/plugins/blur.c:1489:12: [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. str += sprintf (str, data/compiz-0.8.18/plugins/blur.c:1501:13: [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. str += sprintf (str, data/compiz-0.8.18/plugins/blur.c:1522:13: [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. str += sprintf (str, data/compiz-0.8.18/plugins/blur.c:1527:12: [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. str += sprintf (str, data/compiz-0.8.18/plugins/clone.c:106: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 (&clone[k++], &cs->clone[j], data/compiz-0.8.18/plugins/dbus.c:369: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 screenName[256]; data/compiz-0.8.18/plugins/dbus.c:385:6: [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 (screenName, "screen%d", s->screenNum); data/compiz-0.8.18/plugins/dbus.c:499: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 type[3]; data/compiz-0.8.18/plugins/dbus.c:534:7: [2] (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). Risk is low because the source is a constant string. strcpy (type, "ai"); data/compiz-0.8.18/plugins/dbus.c:547:7: [2] (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). Risk is low because the source is a constant string. strcpy (type, "ad"); data/compiz-0.8.18/plugins/dbus.c:561:7: [2] (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). Risk is low because the source is a constant string. strcpy (type, "as"); data/compiz-0.8.18/plugins/dbus.c:575:7: [2] (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). Risk is low because the source is a constant string. strcpy (type, "ab"); data/compiz-0.8.18/plugins/dbus.c:586:7: [2] (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). Risk is low because the source is a constant string. strcpy (type, "as"); data/compiz-0.8.18/plugins/dbus.c:1269: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 sig[2]; data/compiz-0.8.18/plugins/dbus.c:1941: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 *name, path[256]; data/compiz-0.8.18/plugins/dbus.c:2048: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 objectPath[256]; data/compiz-0.8.18/plugins/dbus.c:2081: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 objectPath[256]; data/compiz-0.8.18/plugins/dbus.c:2110: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 objectPath[256]; data/compiz-0.8.18/plugins/dbus.c:2129: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 objectPath[256]; data/compiz-0.8.18/plugins/dbus.c:2143: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 path[256]; data/compiz-0.8.18/plugins/dbus.c:2162: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 path[256]; data/compiz-0.8.18/plugins/dbus.c:2180: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 objectPath[256]; data/compiz-0.8.18/plugins/dbus.c:2209: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 objectPath[256]; data/compiz-0.8.18/plugins/dbus.c:2234: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 objectPath[256]; data/compiz-0.8.18/plugins/dbus.c:2249: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 objectPath[256]; data/compiz-0.8.18/plugins/decoration.c:1381:6: [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 (&dmWin, data, sizeof (Window)); data/compiz-0.8.18/plugins/fuse.c:295: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 str[256]; data/compiz-0.8.18/plugins/fuse.c:411: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 str[256]; data/compiz-0.8.18/plugins/fuse.c:439: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 (str, "screen%d", s->screenNum); data/compiz-0.8.18/plugins/fuse.c:510: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 (str, "value%d", i); data/compiz-0.8.18/plugins/fuse.c:578: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 (value->c, src->c, sizeof (*src->c)); data/compiz-0.8.18/plugins/fuse.c:608:13: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). value->i = atoi (str); data/compiz-0.8.18/plugins/fuse.c:1036: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 (wb->data + off, buf, size); data/compiz-0.8.18/plugins/ini.c:169:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). newFd->screen = atoi (&screenStr[6]); data/compiz-0.8.18/plugins/ini.c:183: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 tmp[MAX_OPTION_LENGTH]; data/compiz-0.8.18/plugins/ini.c:388:43: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). list->value[i].b = item[0] ? (Bool) atoi (item) : FALSE; data/compiz-0.8.18/plugins/ini.c:391:36: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). list->value[i].i = item[0] ? atoi (item) : 0; data/compiz-0.8.18/plugins/ini.c:406:43: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). list->value[i].action.bell = (Bool) atoi (item); data/compiz-0.8.18/plugins/ini.c:458: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 tmp[MAX_OPTION_LENGTH]; data/compiz-0.8.18/plugins/ini.c:503:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). value.b = (Bool) atoi (optionValue); data/compiz-0.8.18/plugins/ini.c:507:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). value.i = atoi (optionValue); data/compiz-0.8.18/plugins/ini.c:536:34: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). value.action.bell = (Bool) atoi (optionValue); data/compiz-0.8.18/plugins/ini.c:637:24: [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 *optionFile = fopen (fullPath, "w"); data/compiz-0.8.18/plugins/ini.c:640: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). optionFile = fopen (fullPath, "w"); data/compiz-0.8.18/plugins/ini.c:791:18: [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). optionFile = fopen (fullPath, "r"); data/compiz-0.8.18/plugins/ini.c:794: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). optionFile = fopen (fullPath, "r"); data/compiz-0.8.18/plugins/ini.c:840:19: [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). optionFile = fopen (fullPath, "r"); data/compiz-0.8.18/plugins/ini.c:863:19: [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). optionFile = fopen (fullPath, "r"); data/compiz-0.8.18/plugins/inotify.c:62: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[256 * (sizeof (struct inotify_event) + 16)]; data/compiz-0.8.18/plugins/minimize.c:200:6: [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 (&retval, data, sizeof (int)); data/compiz-0.8.18/plugins/place.c:548: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 (belowSorted, windows, allocSize); data/compiz-0.8.18/plugins/place.c:553: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 (rightSorted, windows, allocSize); data/compiz-0.8.18/plugins/place.c:641: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 (sorted, windows, allocSize); data/compiz-0.8.18/plugins/png.c:73: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 (base, &p, sizeof (int)); data/compiz-0.8.18/plugins/png.c:163: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 png_sig[PNG_SIG_SIZE]; data/compiz-0.8.18/plugins/png.c:204: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 (data, *buffer, length); data/compiz-0.8.18/plugins/png.c:214: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 png_sig[PNG_SIG_SIZE]; data/compiz-0.8.18/plugins/png.c:220: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 (png_sig, buffer, PNG_SIG_SIZE); data/compiz-0.8.18/plugins/png.c:373: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). fp = fopen (file, "wb"); data/compiz-0.8.18/plugins/png.c:394: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). fp = fopen (file, "wb"); data/compiz-0.8.18/plugins/png.c:436: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). fp = fopen (file, "r"); data/compiz-0.8.18/plugins/regex.c:221:3: [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 errMsg[1024]; data/compiz-0.8.18/plugins/screenshot.c:203: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 line[MAX_LINE_LENGTH]; data/compiz-0.8.18/plugins/screenshot.c:227:20: [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). userDirsFile = fopen (userDirsFilePath, "r"); data/compiz-0.8.18/plugins/screenshot.c:351:4: [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[256]; data/compiz-0.8.18/plugins/screenshot.c:365:4: [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 (name, "screenshot%d.png", number); data/compiz-0.8.18/plugins/svg.c:659:10: [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). fp = fopen (file, "r"); data/compiz-0.8.18/plugins/wall_options.c:1937:9: [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(&wallOptionsVTable, wallPluginVTable, sizeof(CompPluginVTable)); data/compiz-0.8.18/plugins/water.c:239: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 buffer[1024]; data/compiz-0.8.18/plugins/water.c:288: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 str[1024]; data/compiz-0.8.18/plugins/water.c:663: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 (ws->d0, ws->d0 + dWidth, dWidth * sizeof (GLfloat)); data/compiz-0.8.18/plugins/water.c:664: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 (ws->d0 + dWidth * (dHeight - 1), data/compiz-0.8.18/src/display.c:1272:6: [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 (d->modMask, modMask, sizeof (modMask)); data/compiz-0.8.18/src/display.c:1974: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 mask[XIMaskLen (XI_LASTEVENT)] = { 0 }; data/compiz-0.8.18/src/display.c:2003: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 mask[1] = { 0 }; data/compiz-0.8.18/src/display.c:2035: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 str[128]; data/compiz-0.8.18/src/display.c:2050:5: [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 (str, "%d", e->request_code); data/compiz-0.8.18/src/display.c:2619: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 buf[128]; data/compiz-0.8.18/src/display.c:2624:2: [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, "WM_S%d", i); data/compiz-0.8.18/src/display.c:2647:2: [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, "_NET_WM_CM_S%d", i); data/compiz-0.8.18/src/event.c:1289:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). v.i = atoi (value.addr); data/compiz-0.8.18/src/fragment.c:85: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 *noOffset[COMP_FETCH_TARGET_NUM]; data/compiz-0.8.18/src/fragment.c:86: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 *offset[COMP_FETCH_TARGET_NUM]; data/compiz-0.8.18/src/fragment.c:244: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 data[256]; data/compiz-0.8.18/src/fragment.c:519:6: [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 data[256]; data/compiz-0.8.18/src/fragment.c:1295:6: [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 str[1024]; data/compiz-0.8.18/src/main.c:114: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 message[2048]; data/compiz-0.8.18/src/main.c:287: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 *plugin[256]; data/compiz-0.8.18/src/main.c:346:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). defaultRefreshRate = atoi (refreshRateArg); data/compiz-0.8.18/src/main.c:457:13: [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. ptr += sprintf (ptr, "<type>string</type><default>"); data/compiz-0.8.18/src/main.c:462:13: [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. ptr += sprintf (ptr, "</default>"); data/compiz-0.8.18/src/main.c:468:6: [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 (initialPlugins, plugin, nPlugin * sizeof (char *)); data/compiz-0.8.18/src/match.c:519:7: [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 (s, str, sizeof (char) * length); data/compiz-0.8.18/src/match.c:521: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 (s + length, value, sizeof (char) * valueLength); data/compiz-0.8.18/src/matrix.c:106: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 (product->v, vec, sizeof (vec)); data/compiz-0.8.18/src/matrix.c:144: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 (m, identity, sizeof (float) * 16); data/compiz-0.8.18/src/matrix.c:368: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 (transform->m, identity, sizeof (float) * 16); data/compiz-0.8.18/src/metadata.c:56: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 str[1024]; data/compiz-0.8.18/src/metadata.c:105:10: [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). fp = fopen (file, "r"); data/compiz-0.8.18/src/metadata.c:378: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 str[1024]; data/compiz-0.8.18/src/metadata.c:814: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 str[1024]; data/compiz-0.8.18/src/metadata.c:1113: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 str[1024]; data/compiz-0.8.18/src/metadata.c:1208: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 str[1024]; data/compiz-0.8.18/src/metadata.c:1338: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 str[1024]; data/compiz-0.8.18/src/metadata.c:1348: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 str[1024]; data/compiz-0.8.18/src/metadata.c:1359: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 str[1024]; data/compiz-0.8.18/src/metadata.c:1371: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 str[1024]; data/compiz-0.8.18/src/metadata.c:1384: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 str[1024]; data/compiz-0.8.18/src/metadata.c:1398: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 str[1024]; data/compiz-0.8.18/src/metadata.c:1428: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 (buffer, src, length); data/compiz-0.8.18/src/option.c:225: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 (option->value.c, value->c, sizeof (value->c)); data/compiz-0.8.18/src/option.c:351:6: [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 (v, option->value.list.value, data/compiz-0.8.18/src/option.c:626:6: [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 keyCodeStr[256]; data/compiz-0.8.18/src/option.c:641: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 buttonStr[256]; data/compiz-0.8.18/src/option.c:669: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 buttonStr[256]; data/compiz-0.8.18/src/option.c:917: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 tmp[256]; data/compiz-0.8.18/src/screen.c:121: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 tmp[256]; data/compiz-0.8.18/src/screen.c:137:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int screenNum = atoi (name); data/compiz-0.8.18/src/screen.c:519: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 output[1024]; data/compiz-0.8.18/src/screen.c:1101: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 (&p, prop, 4); data/compiz-0.8.18/src/screen.c:1352: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 (data, propData, sizeof (unsigned long)); data/compiz-0.8.18/src/screen.c:1369: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 (data, propData, sizeof (unsigned long)); data/compiz-0.8.18/src/screen.c:1388:6: [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 (data, propData, sizeof (unsigned long) * 2); data/compiz-0.8.18/src/screen.c:1409:6: [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 (data, propData, sizeof (unsigned long)); data/compiz-0.8.18/src/screen.c:3638:6: [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 (&w, data, sizeof (Window)); data/compiz-0.8.18/src/screen.c:3684: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 screenString[stringLen]; data/compiz-0.8.18/src/screen.c:4421: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 (icon + 1, data, + width * height * sizeof (CARD32)); data/compiz-0.8.18/src/session.c:70:24: [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. prop.vals[i].value = (char *) values[i]; data/compiz-0.8.18/src/session.c:147: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 pidBuffer[32]; data/compiz-0.8.18/src/session.c:252: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 errorBuffer[1024]; data/compiz-0.8.18/src/texture.c:114: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 (&data[i * width * 4], data/compiz-0.8.18/src/window.c:118: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 tmp[256]; data/compiz-0.8.18/src/window.c:134:17: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). Window id = atoi (name); data/compiz-0.8.18/src/window.c:523:6: [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 (&win, data, sizeof (Window)); data/compiz-0.8.18/src/window.c:580:6: [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 (&state, data, sizeof (unsigned long)); data/compiz-0.8.18/src/window.c:1010:6: [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 (&a, data, sizeof (Atom)); data/compiz-0.8.18/src/window.c:1166:6: [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 (&value, data, sizeof (unsigned long)); data/compiz-0.8.18/src/window.c:1210:6: [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 (&value, data, sizeof (CARD32)); data/compiz-0.8.18/src/window.c:5128:6: [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 (&value, data, sizeof (CARD32)); data/compiz-0.8.18/gtk-window-decorator/gtk-window-decorator.c:3590:45: [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). pango_layout_set_text (d->layout, name, strlen (name)); data/compiz-0.8.18/gtk-window-decorator/gtk-window-decorator.c:3594:45: [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). pango_layout_set_text (d->layout, d->name, strlen (d->name)); data/compiz-0.8.18/gtk-window-decorator/gtk-window-decorator.c:3614:32: [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 (name && (name_length = strlen (name))) data/compiz-0.8.18/gtk-window-decorator/gtk-window-decorator.c:4057: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). if (name && (name_length = strlen (name))) data/compiz-0.8.18/gtk-window-decorator/gtk-window-decorator.c:6826: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). if (theme && strlen (theme) <= 0) data/compiz-0.8.18/gtk-window-decorator/gtk-window-decorator.c:7338: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). if (session != NULL && strlen (session) > 0) { data/compiz-0.8.18/libdecoration/decoration.c:2826:8: [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 (name)); data/compiz-0.8.18/plugins/blur.c:1423:5: [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 (string), string); data/compiz-0.8.18/plugins/cube.c:318:9: [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 (cs->opt[CUBE_SCREEN_OPTION_SKYDOME_IMG].value.s) == 0 || data/compiz-0.8.18/plugins/dbus.c:536:7: [1] (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). Risk is low because the source is a constant character. strcpy (type, "i"); data/compiz-0.8.18/plugins/dbus.c:549:7: [1] (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). Risk is low because the source is a constant character. strcpy (type, "d"); data/compiz-0.8.18/plugins/dbus.c:563:7: [1] (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). Risk is low because the source is a constant character. strcpy (type, "s"); data/compiz-0.8.18/plugins/dbus.c:577:7: [1] (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). Risk is low because the source is a constant character. strcpy (type, "b"); data/compiz-0.8.18/plugins/dbus.c:588:7: [1] (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). Risk is low because the source is a constant character. strcpy (type, "s"); data/compiz-0.8.18/plugins/dbus.c:1755: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). str = malloc (strlen (name) + 256); data/compiz-0.8.18/plugins/dbus.c:1984:9: [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 (data) > 1) data/compiz-0.8.18/plugins/dbus.c:1987: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). while (i < strlen (data)) data/compiz-0.8.18/plugins/dbus.c:2462: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). plugindir = malloc (strlen (home) + strlen (HOME_PLUGINDIR) + 3); data/compiz-0.8.18/plugins/dbus.c:2462: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). plugindir = malloc (strlen (home) + strlen (HOME_PLUGINDIR) + 3); data/compiz-0.8.18/plugins/fuse.c:553: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). stbuf->st_size = strlen (str); data/compiz-0.8.18/plugins/fuse.c:955: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). wb->size = strlen (wb->data); data/compiz-0.8.18/plugins/fuse.c:995:31: [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). reply_buf_limited (req, str, strlen (str), off, size); data/compiz-0.8.18/plugins/ini.c:98: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). len = strlen (filename); data/compiz-0.8.18/plugins/ini.c:100: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). if (len < (strlen(FILE_SUFFIX) + 2)) data/compiz-0.8.18/plugins/ini.c:158:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (pluginStr, filename, pluginSep + 1); data/compiz-0.8.18/plugins/ini.c:159:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (screenStr, &filename[pluginSep+2], (screenSep - pluginSep) - 1); data/compiz-0.8.18/plugins/ini.c:235: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). tmp = malloc (strlen (home) + strlen (HOME_OPTIONDIR) + 2); data/compiz-0.8.18/plugins/ini.c:235:32: [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). tmp = malloc (strlen (home) + strlen (HOME_OPTIONDIR) + 2); data/compiz-0.8.18/plugins/ini.c:269: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 (screenStr, "allscreens", 12); data/compiz-0.8.18/plugins/ini.c:272: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). len = strlen (screenStr) + strlen (FILE_SUFFIX) + 2; data/compiz-0.8.18/plugins/ini.c:272:32: [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). len = strlen (screenStr) + strlen (FILE_SUFFIX) + 2; data/compiz-0.8.18/plugins/ini.c:275:9: [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). len += strlen (plugin); data/compiz-0.8.18/plugins/ini.c:277:9: [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). len += strlen (CORE_NAME); data/compiz-0.8.18/plugins/ini.c:311:14: [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). length = strlen (line) - strlen (splitPos); data/compiz-0.8.18/plugins/ini.c:311:30: [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). length = strlen (line) - strlen (splitPos); data/compiz-0.8.18/plugins/ini.c:315:8: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (*optionName, line, length); data/compiz-0.8.18/plugins/ini.c:319: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). optionLength = strlen (splitPos); data/compiz-0.8.18/plugins/ini.c:325:7: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (*optionValue, splitPos, optionLength); data/compiz-0.8.18/plugins/ini.c:345: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). int length = strlen (csv); data/compiz-0.8.18/plugins/ini.c:363: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). itemLength = strlen (splitStart) - strlen (splitEnd); data/compiz-0.8.18/plugins/ini.c:363: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). itemLength = strlen (splitStart) - strlen (splitEnd); data/compiz-0.8.18/plugins/ini.c:367:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (item, splitStart, itemLength); data/compiz-0.8.18/plugins/ini.c:627:41: [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). fullPath = malloc (sizeof (char) * (strlen (filename) + strlen (directory) + 2)); data/compiz-0.8.18/plugins/ini.c:627:61: [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). fullPath = malloc (sizeof (char) * (strlen (filename) + strlen (directory) + 2)); data/compiz-0.8.18/plugins/ini.c:702:3: [1] (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). Risk is low because the source is a constant character. strcpy (strVal, ""); data/compiz-0.8.18/plugins/ini.c:712:11: [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. Risk is low because the source is a constant character. strncat (strVal, ",", stringLen); data/compiz-0.8.18/plugins/ini.c:717:4: [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 (strVal, itemVal, stringLen); data/compiz-0.8.18/plugins/ini.c:781:41: [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). fullPath = malloc (sizeof (char) * (strlen (filename) + strlen (directory) + 2)); data/compiz-0.8.18/plugins/ini.c:781:61: [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). fullPath = malloc (sizeof (char) * (strlen (filename) + strlen (directory) + 2)); data/compiz-0.8.18/plugins/inotify.c:67:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). len = read (ic->fd, buf, sizeof (buf)); data/compiz-0.8.18/plugins/png.c:333:9: [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 (name) > 4) data/compiz-0.8.18/plugins/png.c:335:26: [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 (strcasecmp (name + (strlen (name) - 4), ".png") == 0) data/compiz-0.8.18/plugins/png.c:360: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). len = (path ? strlen (path) : 0) + strlen (name) + strlen (extension) + 2; data/compiz-0.8.18/plugins/png.c:360:40: [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). len = (path ? strlen (path) : 0) + strlen (name) + strlen (extension) + 2; data/compiz-0.8.18/plugins/png.c:360:56: [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). len = (path ? strlen (path) : 0) + strlen (name) + strlen (extension) + 2; data/compiz-0.8.18/plugins/png.c:424: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). len = (path ? strlen (path) : 0) + strlen (name) + strlen (extension) + 2; data/compiz-0.8.18/plugins/png.c:424:40: [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). len = (path ? strlen (path) : 0) + strlen (name) + strlen (extension) + 2; data/compiz-0.8.18/plugins/png.c:424:56: [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). len = (path ? strlen (path) : 0) + strlen (name) + strlen (extension) + 2; data/compiz-0.8.18/plugins/screenshot.c:175: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). if (strlen (d->d_name) == 14 + nDigits) data/compiz-0.8.18/plugins/screenshot.c:185: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). int al = strlen ((*a)->d_name); data/compiz-0.8.18/plugins/screenshot.c:186: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). int bl = strlen ((*b)->d_name); data/compiz-0.8.18/plugins/screenshot.c:202:24: [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). size_t varLength = strlen (varName); data/compiz-0.8.18/plugins/screenshot.c:209: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). int homeLength = strlen (home); data/compiz-0.8.18/plugins/screenshot.c:214: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). if (configHome && strlen (configHome)) data/compiz-0.8.18/plugins/screenshot.c:247: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). while (strlen (line) > 0 && data/compiz-0.8.18/plugins/screenshot.c:248: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). (line[strlen (line) - 1] == '\r' || data/compiz-0.8.18/plugins/screenshot.c:249: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). line[strlen (line) - 1] == '\n')) data/compiz-0.8.18/plugins/screenshot.c:250:8: [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). line[strlen (line) - 1] = '\0'; data/compiz-0.8.18/plugins/screenshot.c:256:30: [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). size_t valueSrcLength = strlen (line) - valueStartPos - 1; data/compiz-0.8.18/plugins/screenshot.c:282:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (desktopDir + homeEndDstPos, data/compiz-0.8.18/plugins/screenshot.c:328: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 (dir) == 0) data/compiz-0.8.18/plugins/screenshot.c:379:26: [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). command = malloc (strlen (app) + data/compiz-0.8.18/plugins/screenshot.c:380: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). strlen (dir) + data/compiz-0.8.18/plugins/screenshot.c:381: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). strlen (name) + 3); data/compiz-0.8.18/plugins/svg.c:517:56: [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). svg = rsvg_handle_new_from_data ((guint8 *) data, strlen (data), data/compiz-0.8.18/plugins/svg.c:711:9: [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 (name) > 4) data/compiz-0.8.18/plugins/svg.c:713:26: [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 (strcasecmp (name + (strlen (name) - 4), ".svg") == 0) data/compiz-0.8.18/plugins/svg.c:736: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). len = (path ? strlen (path) : 0) + strlen (name) + strlen (extension) + 2; data/compiz-0.8.18/plugins/svg.c:736:40: [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). len = (path ? strlen (path) : 0) + strlen (name) + strlen (extension) + 2; data/compiz-0.8.18/plugins/svg.c:736:56: [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). len = (path ? strlen (path) : 0) + strlen (name) + strlen (extension) + 2; data/compiz-0.8.18/plugins/water.c:219:5: [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 (string), string); data/compiz-0.8.18/src/display.c:513: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). if (theme && strlen(theme)) data/compiz-0.8.18/src/display.c:2684:5: [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 (PACKAGE)); data/compiz-0.8.18/src/display.c:3194: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). path = malloc (strlen (home) + strlen (HOME_IMAGEDIR) + 2); data/compiz-0.8.18/src/display.c:3194:37: [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). path = malloc (strlen (home) + strlen (HOME_IMAGEDIR) + 2); data/compiz-0.8.18/src/fragment.c:517: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). int oldSize = strlen (info->data); data/compiz-0.8.18/src/fragment.c:523:26: [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). newSize = oldSize + strlen (data); data/compiz-0.8.18/src/fragment.c:544: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). int oldSize = strlen (info->data); data/compiz-0.8.18/src/fragment.c:545:35: [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 newSize = oldSize + strlen (op->data); data/compiz-0.8.18/src/fragment.c:643:5: [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 (info.data), info.data); data/compiz-0.8.18/src/fragment.c:772: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). prefixLength = strlen (prefix); data/compiz-0.8.18/src/fragment.c:776: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). length = strlen (header[i].name); data/compiz-0.8.18/src/fragment.c:790: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). copy = malloc (strlen (data) + count * (strlen (prefix) + 1) + 1); data/compiz-0.8.18/src/fragment.c:790:45: [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). copy = malloc (strlen (data) + count * (strlen (prefix) + 1) + 1); data/compiz-0.8.18/src/fragment.c:818:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (dst, haystack, first - haystack); data/compiz-0.8.18/src/fragment.c:822: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). length = strlen (header[index].name); data/compiz-0.8.18/src/fragment.c:940: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 (strncmp (name, reserved[i], strlen (reserved[i])) == 0) data/compiz-0.8.18/src/fragment.c:1044: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). int size = strlen (str) + 1; data/compiz-0.8.18/src/fragment.c:1098: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). int size = strlen (str) + 1; data/compiz-0.8.18/src/fragment.c:1166: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). nameBuffer = malloc (strlen (name) + 64); data/compiz-0.8.18/src/main.c:438:32: [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). ctx.refreshRateData = malloc (strlen (refreshRateArg) + 256); data/compiz-0.8.18/src/main.c:450:14: [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). size += strlen (plugin[i]) + 16; data/compiz-0.8.18/src/match.c:430:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (value, &str[i], length); data/compiz-0.8.18/src/match.c:489: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). value = malloc (sizeof (char) * (strlen (group) + 7)); data/compiz-0.8.18/src/match.c:501: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). value = malloc (sizeof (char) * (strlen (op->exp.value) + 5)); data/compiz-0.8.18/src/match.c:513: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). int valueLength = strlen (value); data/compiz-0.8.18/src/metadata.c:89: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). int length = strlen (name) + strlen (EXTENSION) + 1; data/compiz-0.8.18/src/metadata.c:89:37: [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 length = strlen (name) + strlen (EXTENSION) + 1; data/compiz-0.8.18/src/metadata.c:94: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). length += strlen (path) + 1; data/compiz-0.8.18/src/metadata.c:157: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). path = malloc (strlen (home) + strlen (HOME_METADATADIR) + 2); data/compiz-0.8.18/src/metadata.c:157:33: [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). path = malloc (strlen (home) + strlen (HOME_METADATADIR) + 2); data/compiz-0.8.18/src/metadata.c:185: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). doc = xmlReadMemory (string, strlen (string), NULL, NULL, 0); data/compiz-0.8.18/src/metadata.c:1412: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). int srcLength = strlen (src); data/compiz-0.8.18/src/option.c:543: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). len = strlen (a); data/compiz-0.8.18/src/option.c:546:9: [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). len += strlen (s); data/compiz-0.8.18/src/option.c:793:37: [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 (strncmp (binding, "Button", strlen ("Button")) == 0) data/compiz-0.8.18/src/option.c:797:24: [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 (sscanf (binding + strlen ("Button"), "%d", &buttonNum) == 1) data/compiz-0.8.18/src/option.c:860: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). needle += strlen (edgeToString (i)); data/compiz-0.8.18/src/plugin.c:161: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). file = malloc ((path ? strlen (path) : 0) + strlen (name) + 8); data/compiz-0.8.18/src/plugin.c:161:49: [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). file = malloc ((path ? strlen (path) : 0) + strlen (name) + 8); data/compiz-0.8.18/src/plugin.c:242: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). int length = strlen (name->d_name); data/compiz-0.8.18/src/plugin.c:280: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). length = strlen (nameList[i]->d_name); data/compiz-0.8.18/src/plugin.c:285:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy (name, nameList[i]->d_name + 3, length - 6); data/compiz-0.8.18/src/plugin.c:570: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). plugindir = malloc (strlen (home) + strlen (HOME_PLUGINDIR) + 3); data/compiz-0.8.18/src/plugin.c:570: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). plugindir = malloc (strlen (home) + strlen (HOME_PLUGINDIR) + 3); data/compiz-0.8.18/src/plugin.c:671: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). plugindir = malloc (strlen (home) + strlen (HOME_PLUGINDIR) + 3); data/compiz-0.8.18/src/plugin.c:671: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). plugindir = malloc (strlen (home) + strlen (HOME_PLUGINDIR) + 3); data/compiz-0.8.18/src/screen.c:1203:35: [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 char *) PACKAGE, strlen (PACKAGE)); data/compiz-0.8.18/src/screen.c:3683: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 stringLen = strlen (s->display->displayString) + 5; data/compiz-0.8.18/src/screen.c:3703: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). pos = screenString + strlen (screenString); data/compiz-0.8.18/src/session.c:71:24: [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). prop.vals[i].length = strlen (values[i]); data/compiz-0.8.18/src/session.c:156: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). progVal.length = strlen (progVal.value); data/compiz-0.8.18/src/session.c:167:24: [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). pidVal.length = strlen (pidBuffer); data/compiz-0.8.18/src/session.c:179: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). userVal.length = strlen (pw->pw_name); ANALYSIS SUMMARY: Hits = 374 Lines analyzed = 86431 in approximately 1.54 seconds (56196 lines/second) Physical Source Lines of Code (SLOC) = 67805 Hits@level = [0] 98 [1] 134 [2] 155 [3] 17 [4] 68 [5] 0 Hits@level+ = [0+] 472 [1+] 374 [2+] 240 [3+] 85 [4+] 68 [5+] 0 Hits/KSLOC@level+ = [0+] 6.96114 [1+] 5.51582 [2+] 3.53956 [3+] 1.25359 [4+] 1.00288 [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.