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/libcompizconfig-0.8.18/include/ccs.h
Examining data/libcompizconfig-0.8.18/include/ccs-backend.h
Examining data/libcompizconfig-0.8.18/plugin/ccp.c
Examining data/libcompizconfig-0.8.18/src/main.c
Examining data/libcompizconfig-0.8.18/src/ini.c
Examining data/libcompizconfig-0.8.18/src/bindings.c
Examining data/libcompizconfig-0.8.18/src/iniparser.h
Examining data/libcompizconfig-0.8.18/src/iniparser.c
Examining data/libcompizconfig-0.8.18/src/lists.c
Examining data/libcompizconfig-0.8.18/src/config.c
Examining data/libcompizconfig-0.8.18/src/compiz.cpp
Examining data/libcompizconfig-0.8.18/src/ccs-private.h
Examining data/libcompizconfig-0.8.18/src/filewatch.c
Examining data/libcompizconfig-0.8.18/backend/ini.c

FINAL RESULTS:

data/libcompizconfig-0.8.18/backend/ini.c:70:12:  [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.
    size = vsnprintf (stack, init_size, format, args);
data/libcompizconfig-0.8.18/backend/ini.c:80:2:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	vsprintf (string, format, args2);
data/libcompizconfig-0.8.18/include/ccs.h:33:52:  [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.
#define D(x, fmt, args...)  { if (x <= DEBUGLEVEL) printf(fmt, ##args); }
data/libcompizconfig-0.8.18/src/bindings.c:121: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/libcompizconfig-0.8.18/src/bindings.c:126:6:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	    sprintf (r, "%s", a);
data/libcompizconfig-0.8.18/src/compiz.cpp:2951:2:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
	sscanf (nameList[i]->d_name, "lib%s", name);
data/libcompizconfig-0.8.18/src/ini.c:731:2:  [4] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused).
	strcat (stringBuffer, valueString);
data/libcompizconfig-0.8.18/src/iniparser.c:182:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy (l, s);
data/libcompizconfig-0.8.18/src/iniparser.c:554:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (longkey, "%s:%s", sec, key);
data/libcompizconfig-0.8.18/src/iniparser.c:556: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 (longkey, sec);
data/libcompizconfig-0.8.18/src/iniparser.c:702:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (keym, "%s:", secname);
data/libcompizconfig-0.8.18/src/iniparser.c:876: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 (sec, strlwc (sec));
data/libcompizconfig-0.8.18/src/iniparser.c:883:7:  [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 (key, strlwc (strcrop (key)));
data/libcompizconfig-0.8.18/src/iniparser.c:895:7:  [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 (val, strcrop (val));
data/libcompizconfig-0.8.18/src/main.c:59:12:  [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.
    size = vsnprintf (stack, init_size, format, args);
data/libcompizconfig-0.8.18/src/main.c:69:2:  [4] (format) vsprintf:
  Potential format string problem (CWE-134). Make format string constant.
	vsprintf (string, format, args2);
data/libcompizconfig-0.8.18/src/main.c:2481:2:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
	sprintf (file, "%s/%s", path, nameList[i]->d_name);
data/libcompizconfig-0.8.18/backend/ini.c:110:17:  [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.
    configDir = getenv ("XDG_CONFIG_HOME");
data/libcompizconfig-0.8.18/backend/ini.c:116:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    homeDir = getenv ("HOME");
data/libcompizconfig-0.8.18/backend/ini.c:542:17:  [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.
    configDir = getenv ("XDG_CONFIG_HOME");
data/libcompizconfig-0.8.18/backend/ini.c:557:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    homeDir = getenv ("HOME");
data/libcompizconfig-0.8.18/src/compiz.cpp:54: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 *lang = getenv ("LC_ALL");
data/libcompizconfig-0.8.18/src/compiz.cpp:57: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.
	lang = getenv ("LC_MESSAGES");
data/libcompizconfig-0.8.18/src/compiz.cpp:60: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.
	lang = getenv ("LANG");
data/libcompizconfig-0.8.18/src/compiz.cpp:1903:29:  [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.
    const char *cacheHome = getenv ("XDG_CACHE_HOME");
data/libcompizconfig-0.8.18/src/compiz.cpp:1911: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.
	const char *home = getenv ("HOME");
data/libcompizconfig-0.8.18/src/compiz.cpp:2965:30:  [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 *compizNoProtobuf = getenv ("COMPIZ_NO_PROTOBUF");
data/libcompizconfig-0.8.18/src/compiz.cpp:2990: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.
	const char *home = getenv ("HOME");
data/libcompizconfig-0.8.18/src/compiz.cpp:3018: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.
    const char *home = getenv ("HOME");
data/libcompizconfig-0.8.18/src/config.c:37:17:  [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.
    configDir = getenv ("XDG_CONFIG_HOME");
data/libcompizconfig-0.8.18/src/config.c:43:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    homeDir = getenv ("HOME");
data/libcompizconfig-0.8.18/src/config.c:58:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    profile = getenv ("COMPIZ_CONFIG_PROFILE");
data/libcompizconfig-0.8.18/src/config.c:64:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    profile = getenv ("MATE_DESKTOP_SESSION_ID");
data/libcompizconfig-0.8.18/src/config.c:68:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    profile = getenv ("KDE_SESSION_VERSION");
data/libcompizconfig-0.8.18/src/config.c:72:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
    profile = getenv ("KDE_FULL_SESSION");
data/libcompizconfig-0.8.18/src/main.c:619: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.
    const char *home = getenv ("HOME");
data/libcompizconfig-0.8.18/src/main.c:2494: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.
    const char *home = getenv ("HOME");
data/libcompizconfig-0.8.18/backend/ini.c:65: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       stack[init_size];
data/libcompizconfig-0.8.18/backend/ini.c:84: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 (string, stack, (unsigned long) size + 1UL);
data/libcompizconfig-0.8.18/backend/ini.c:179:13:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	    file = fopen (fileName, "w");
data/libcompizconfig-0.8.18/plugin/ccp.c:440: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).
	    screenNum = atoi (name);
data/libcompizconfig-0.8.18/plugin/ccp.c:489: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).
	    screenNum = atoi (name);
data/libcompizconfig-0.8.18/plugin/ccp.c:582: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 tmp[256];
data/libcompizconfig-0.8.18/src/bindings.c:215: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/libcompizconfig-0.8.18/src/bindings.c:430: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/libcompizconfig-0.8.18/src/compiz.cpp:1139: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 newPath[1024];
data/libcompizconfig-0.8.18/src/compiz.cpp:1451:20:  [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.
		if (strcasecmp ((char *) value, edge[j]) == 0)
data/libcompizconfig-0.8.18/src/compiz.cpp:2622: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).
    FILE *pbFile = fopen (pbPath, "rb");
data/libcompizconfig-0.8.18/src/compiz.cpp:2689: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).
    FILE *pbFile = fopen (pbFilePath, "wb");
data/libcompizconfig-0.8.18/src/compiz.cpp:2834:16:  [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 *fp = fopen (xmlFilePath, "r");
data/libcompizconfig-0.8.18/src/compiz.cpp:2950:2:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
	char name[1024];
data/libcompizconfig-0.8.18/src/compiz.cpp:3056:16:  [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 *fp = fopen (pPrivate->xmlFile, "r");
data/libcompizconfig-0.8.18/src/config.c:127: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 (SYSCONFDIR "/compizconfig/config", "r");
data/libcompizconfig-0.8.18/src/filewatch.c:73: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/libcompizconfig-0.8.18/src/ini.c:76:12:  [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 = fopen (fileName, "a+");
data/libcompizconfig-0.8.18/src/ini.c:659: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         valueBuffer[100];
data/libcompizconfig-0.8.18/src/iniparser.c:59:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open (fileName, O_WRONLY | O_CREAT | O_TRUNC, 0666);
data/libcompizconfig-0.8.18/src/iniparser.c:61:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
	fd = open (fileName, O_RDONLY | O_CREAT, 0666);
data/libcompizconfig-0.8.18/src/iniparser.c:114:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char l[ASCIILINESZ+1];
data/libcompizconfig-0.8.18/src/iniparser.c:175:12:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    static char l[ASCIILINESZ+1];
data/libcompizconfig-0.8.18/src/iniparser.c:221: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 (newptr, ptr, size);
data/libcompizconfig-0.8.18/src/iniparser.c:549: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 longkey[2*ASCIILINESZ+1];
data/libcompizconfig-0.8.18/src/iniparser.c:660: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    keym[ASCIILINESZ+1];
data/libcompizconfig-0.8.18/src/iniparser.c:834: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        lin[ASCIILINESZ+1];
data/libcompizconfig-0.8.18/src/iniparser.c:835: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        sec[ASCIILINESZ+1];
data/libcompizconfig-0.8.18/src/iniparser.c:836: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        key[ASCIILINESZ+1];
data/libcompizconfig-0.8.18/src/iniparser.c:837: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        val[ASCIILINESZ+1];
data/libcompizconfig-0.8.18/src/iniparser.c:847:11:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    ini = fopen (ininame, "r");
data/libcompizconfig-0.8.18/src/lists.c:371: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 (&rv[i], &list->data->value.asColor,
data/libcompizconfig-0.8.18/src/main.c:54: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       stack[init_size];
data/libcompizconfig-0.8.18/src/main.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 (string, stack, (unsigned long) size + 1UL);
data/libcompizconfig-0.8.18/src/main.c:725: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 (to, from, sizeof (CCSSettingValue));
data/libcompizconfig-0.8.18/src/main.c:1249: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->value.asKey, &l1->data->value.asKey,
data/libcompizconfig-0.8.18/src/main.c:1253: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->value.asButton, &l1->data->value.asButton,
data/libcompizconfig-0.8.18/src/main.c:1263: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->value.asColor, &l1->data->value.asColor,
data/libcompizconfig-0.8.18/src/main.c:2480: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 file[1024];
data/libcompizconfig-0.8.18/src/main.c:2633: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 (fileName, "r");
data/libcompizconfig-0.8.18/backend/ini.c:111: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).
    if (configDir != NULL && strlen (configDir) > 0)
data/libcompizconfig-0.8.18/backend/ini.c:117: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 (homeDir != NULL && strlen (homeDir) > 0)
data/libcompizconfig-0.8.18/backend/ini.c:266: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 (!currentProfile || !strlen (currentProfile))
data/libcompizconfig-0.8.18/backend/ini.c:313: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 (!currentProfile || !strlen (currentProfile))
data/libcompizconfig-0.8.18/backend/ini.c:469: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 (!currentProfile || !strlen (currentProfile))
data/libcompizconfig-0.8.18/backend/ini.c:495: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/libcompizconfig-0.8.18/backend/ini.c:543: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).
    if (configDir != NULL && strlen (configDir) > 0)
data/libcompizconfig-0.8.18/backend/ini.c:558: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 (homeDir == NULL && strlen (configDir) <= 0)
data/libcompizconfig-0.8.18/src/bindings.c:110: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/libcompizconfig-0.8.18/src/bindings.c:113: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/libcompizconfig-0.8.18/src/bindings.c:239: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).
	int         modLen = strlen (modifierList[i].name);
data/libcompizconfig-0.8.18/src/bindings.c:263: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).
        int edgeLen = strlen (edgeList[i].name);
data/libcompizconfig-0.8.18/src/bindings.c:296: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).
	int         edgeLen = strlen (edgeList[i].name);
data/libcompizconfig-0.8.18/src/bindings.c:319: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).
    if (!binding || !strlen(binding) ||
data/libcompizconfig-0.8.18/src/bindings.c:320: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).
	strncasecmp (binding, "Disabled", strlen ("Disabled")) == 0)
data/libcompizconfig-0.8.18/src/bindings.c:371: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).
    if (!binding || !strlen(binding) ||
data/libcompizconfig-0.8.18/src/bindings.c:372: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).
	strncmp (binding, "Disabled", strlen ("Disabled")) == 0)
data/libcompizconfig-0.8.18/src/bindings.c:391: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/libcompizconfig-0.8.18/src/bindings.c:395: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/libcompizconfig-0.8.18/src/compiz.cpp:56: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).
    if (!lang || !strlen (lang))
data/libcompizconfig-0.8.18/src/compiz.cpp:59: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).
    if (!lang || !strlen (lang))
data/libcompizconfig-0.8.18/src/compiz.cpp:681:10:  [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) || readonly)
data/libcompizconfig-0.8.18/src/compiz.cpp:738: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 (value))
data/libcompizconfig-0.8.18/src/compiz.cpp:829:10:  [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))
data/libcompizconfig-0.8.18/src/compiz.cpp:957: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/libcompizconfig-0.8.18/src/compiz.cpp:972: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/libcompizconfig-0.8.18/src/compiz.cpp:1039: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 ((char *) xpathObj->stringval))
data/libcompizconfig-0.8.18/src/compiz.cpp:1142: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).
    if (!lang || !strlen (lang))
data/libcompizconfig-0.8.18/src/compiz.cpp:1905: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).
    if (cacheHome && strlen (cacheHome))
data/libcompizconfig-0.8.18/src/compiz.cpp:1912: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).
	if (home && strlen (home) > 0)
data/libcompizconfig-0.8.18/src/compiz.cpp:2020: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 (setting->hints) > 0)
data/libcompizconfig-0.8.18/src/compiz.cpp:2023: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).
	if (groupListPBv && strlen (setting->group) > 0)
data/libcompizconfig-0.8.18/src/compiz.cpp:2026: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).
	if (subgroupListPBv && strlen (setting->subGroup) > 0)
data/libcompizconfig-0.8.18/src/compiz.cpp:2172: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).
    if (!name || !strlen (name) || !type || !strlen (type) ||
data/libcompizconfig-0.8.18/src/compiz.cpp:2172:46:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    if (!name || !strlen (name) || !type || !strlen (type) ||
data/libcompizconfig-0.8.18/src/compiz.cpp:2284: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).
	    if (value && strlen (value))
data/libcompizconfig-0.8.18/src/compiz.cpp:2292: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).
	    if (value && !strlen (value))
data/libcompizconfig-0.8.18/src/compiz.cpp:2482: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).
    if (!name || !strlen (name))
data/libcompizconfig-0.8.18/src/compiz.cpp:2780: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).
	name = strndup (xmlName, strlen (xmlName) - 4);
data/libcompizconfig-0.8.18/src/compiz.cpp:2952: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 (name) > 3)
data/libcompizconfig-0.8.18/src/compiz.cpp:2953: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).
	    name[strlen (name) - 3] = 0;
data/libcompizconfig-0.8.18/src/compiz.cpp:2991: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).
	if (home && strlen (home) > 0)
data/libcompizconfig-0.8.18/src/compiz.cpp:3019: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).
    if (home && strlen (home) > 0)
data/libcompizconfig-0.8.18/src/compiz.cpp:3030: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).
    if (home && strlen (home) > 0)
data/libcompizconfig-0.8.18/src/config.c:38: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).
    if (configDir != NULL && strlen (configDir) > 0)
data/libcompizconfig-0.8.18/src/config.c:44: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 (homeDir != NULL && strlen (homeDir) > 0)
data/libcompizconfig-0.8.18/src/config.c:59: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 (profile != NULL && strlen (profile) > 0)
data/libcompizconfig-0.8.18/src/config.c:65: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).
    if (profile && strlen (profile))
data/libcompizconfig-0.8.18/src/config.c:69: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).
    if (profile && strlen (profile) && strcasecmp (profile, "4") == 0)
data/libcompizconfig-0.8.18/src/config.c:73: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).
    if (profile && strlen (profile) && strcasecmp (profile, "true") == 0)
data/libcompizconfig-0.8.18/src/filewatch.c:80:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    len = read (inotifyFd, buf, sizeof (buf));
data/libcompizconfig-0.8.18/src/ini.c:52:5:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    strncpy (path, fileName, delim - fileName);
data/libcompizconfig-0.8.18/src/ini.c:301: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 (value);
data/libcompizconfig-0.8.18/src/ini.c:337: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 (valueString);
data/libcompizconfig-0.8.18/src/ini.c:681:6:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
	    strncpy (valueBuffer,
data/libcompizconfig-0.8.18/src/ini.c:703:10:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
    	    strncpy (valueBuffer,
data/libcompizconfig-0.8.18/src/ini.c:715: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).
	fill = strlen (stringBuffer);
data/libcompizconfig-0.8.18/src/ini.c:717: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).
	if ((fill + strlen (valueString) + 1) >= bufferSize)
data/libcompizconfig-0.8.18/src/ini.c:732:2:  [1] (buffer) strcat:
  Does not check for buffer overflows when concatenating to destination
  [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or
  snprintf (warning: strncat is easily misused). Risk is low because the
  source is a constant character.
	strcat (stringBuffer, ";");
data/libcompizconfig-0.8.18/src/iniparser.c:184: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).
    last = l + strlen (l);
data/libcompizconfig-0.8.18/src/iniparser.c:248: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 (key);
data/libcompizconfig-0.8.18/src/iniparser.c:700: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).
	seclen  = (int) strlen (secname);
data/libcompizconfig-0.8.18/src/main.c:179: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).
	    (cPrivate->profile && strlen (cPrivate->profile)) ?
data/libcompizconfig-0.8.18/src/main.c:623: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).
    if (home != NULL && strlen (home) > 0)
data/libcompizconfig-0.8.18/src/main.c:1524: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).
    if (!name || !strlen (name))
data/libcompizconfig-0.8.18/src/main.c:2372: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).
    if (!name || !strlen (name))
data/libcompizconfig-0.8.18/src/main.c:2452: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/libcompizconfig-0.8.18/src/main.c:2497: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).
    if (home != NULL && strlen (home) > 0)

ANALYSIS SUMMARY:

Hits = 145
Lines analyzed = 11854 in approximately 0.29 seconds (40230 lines/second)
Physical Source Lines of Code (SLOC) = 9068
Hits@level = [0]  27 [1]  68 [2]  40 [3]  20 [4]  17 [5]   0
Hits@level+ = [0+] 172 [1+] 145 [2+]  77 [3+]  37 [4+]  17 [5+]   0
Hits/KSLOC@level+ = [0+] 18.9678 [1+] 15.9903 [2+] 8.4914 [3+] 4.08028 [4+] 1.87472 [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.